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:
Anis Eleuch
2024-08-20 16:42:49 +01:00
committed by GitHub
parent 37383ecd09
commit 85c3db3a93
6 changed files with 121 additions and 21 deletions

View File

@@ -230,8 +230,11 @@ func (s *erasureSets) connectDisks(log bool) {
}
return
}
if disk.IsLocal() && disk.Healing() != nil {
globalBackgroundHealState.pushHealLocalDisks(disk.Endpoint())
if disk.IsLocal() {
h := disk.Healing()
if h != nil && !h.Finished {
globalBackgroundHealState.pushHealLocalDisks(disk.Endpoint())
}
}
s.erasureDisksMu.Lock()
setIndex, diskIndex, err := findDiskIndex(s.format, format)