mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00:00
fix: make sure to delete dangling objects during heal (#13138)
heal with --remove was not removing dangling versions on versioned buckets, this PR fixes this properly. this is a regression introduced in PR #12617
This commit is contained in:
1 parent
a366143c5b
commit
495c55e6a5
4 files changed
+173
-12
No files matched your search
@@ -1668,8 +1668,11 @@ func (z *erasureServerPools) HealObjects(ctx context.Context, bucket, prefix str
|
||||
}
|
||||
fivs, err := entry.fileInfoVersions(bucket)
|
||||
if err != nil {
|
||||
errCh <- err
|
||||
cancel()
|
||||
if err := healObject(bucket, entry.name, ""); err != nil {
|
||||
errCh <- err
|
||||
cancel()
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1705,9 +1708,13 @@ func (z *erasureServerPools) HealObjects(ctx context.Context, bucket, prefix str
|
||||
agreed: healEntry,
|
||||
partial: func(entries metaCacheEntries, nAgreed int, errs []error) {
|
||||
entry, ok := entries.resolve(&resolver)
|
||||
if ok {
|
||||
healEntry(*entry)
|
||||
if !ok {
|
||||
// check if we can get one entry atleast
|
||||
// proceed to heal nonetheless.
|
||||
entry, _ = entries.firstFound()
|
||||
}
|
||||
|
||||
healEntry(*entry)
|
||||
},
|
||||
finished: nil,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user