Properly restart fresh disk healing when failed in some places (#16413)

This commit is contained in:
Anis Elleuch
2023-01-14 00:36:46 +01:00
committed by GitHub
parent c8e1154f1e
commit beb1924437
2 changed files with 5 additions and 3 deletions

View File

@@ -441,9 +441,10 @@ func monitorLocalDisksAndHeal(ctx context.Context, z *erasureServerPools) {
for _, disk := range healDisks {
go func(disk Endpoint) {
globalBackgroundHealState.markDiskForHealing(disk)
globalBackgroundHealState.setDiskHealingStatus(disk, true)
err := healFreshDisk(ctx, z, disk)
if err != nil {
globalBackgroundHealState.setDiskHealingStatus(disk, false)
printEndpointError(disk, err, false)
return
}