mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
heal: Add finished flag to .healing.bin to avoid removing this latter (#20250)
Sometimes, we need historical information in .healing.bin, such as the number of expired objects that the healing avoids to heal and that can create drive usage disparency in the same erasure set. For that reason, this commit will not remove .healing.bin anymore and it will have a new field called Finished so we know healing is finished in that drive.
This commit is contained in:
@@ -227,7 +227,11 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []string,
|
||||
|
||||
// Collect updates to tracker from concurrent healEntry calls
|
||||
results := make(chan healEntryResult, 1000)
|
||||
defer close(results)
|
||||
quitting := make(chan struct{})
|
||||
defer func() {
|
||||
close(results)
|
||||
<-quitting
|
||||
}()
|
||||
|
||||
go func() {
|
||||
for res := range results {
|
||||
@@ -241,6 +245,9 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []string,
|
||||
|
||||
tracker.updateProgress(res.success, res.skipped, res.bytes)
|
||||
}
|
||||
|
||||
healingLogIf(ctx, tracker.update(ctx))
|
||||
close(quitting)
|
||||
}()
|
||||
|
||||
var retErr error
|
||||
|
||||
Reference in New Issue
Block a user