mirror of
https://github.com/minio/minio.git
synced 2025-01-26 14:13:16 -05:00
fix: avoid counting out of band deletes during disk heal (#18205)
This commit is contained in:
parent
77e94087cf
commit
21ecb941fe
@ -309,7 +309,7 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []string,
|
|||||||
Remove: healDeleteDangling,
|
Remove: healDeleteDangling,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if isErrObjectNotFound(err) {
|
if isErrObjectNotFound(err) || isErrVersionNotFound(err) {
|
||||||
// queueing happens across namespace, ignore
|
// queueing happens across namespace, ignore
|
||||||
// objects that are not found.
|
// objects that are not found.
|
||||||
return
|
return
|
||||||
@ -335,7 +335,7 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []string,
|
|||||||
ScanMode: scanMode,
|
ScanMode: scanMode,
|
||||||
Remove: healDeleteDangling,
|
Remove: healDeleteDangling,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
if isErrObjectNotFound(err) {
|
if isErrObjectNotFound(err) || isErrVersionNotFound(err) {
|
||||||
// queueing happens across namespace, ignore
|
// queueing happens across namespace, ignore
|
||||||
// objects that are not found.
|
// objects that are not found.
|
||||||
versionNotFound++
|
versionNotFound++
|
||||||
@ -344,9 +344,7 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []string,
|
|||||||
// If not deleted, assume they failed.
|
// If not deleted, assume they failed.
|
||||||
result = healEntryFailure(uint64(version.Size))
|
result = healEntryFailure(uint64(version.Size))
|
||||||
if version.VersionID != "" {
|
if version.VersionID != "" {
|
||||||
if !isErrVersionNotFound(err) {
|
logger.LogIf(ctx, fmt.Errorf("unable to heal object %s/%s-v(%s): %w", bucket, version.Name, version.VersionID, err))
|
||||||
logger.LogIf(ctx, fmt.Errorf("unable to heal object %s/%s-v(%s): %w", bucket, version.Name, version.VersionID, err))
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
logger.LogIf(ctx, fmt.Errorf("unable to heal object %s/%s: %w", bucket, version.Name, err))
|
logger.LogIf(ctx, fmt.Errorf("unable to heal object %s/%s: %w", bucket, version.Name, err))
|
||||||
}
|
}
|
||||||
@ -358,7 +356,7 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []string,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// All versions resulted in 'ObjectNotFound'
|
// All versions resulted in 'ObjectNotFound/VersionNotFound'
|
||||||
if versionNotFound == len(fivs.Versions) {
|
if versionNotFound == len(fivs.Versions) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user