Don't autoheal if disks are healing (#11558)

Don't spawn automatic healing ops if a disk is healing.
master
Klaus Post 4 years ago committed by GitHub
parent aa8450a2a1
commit 11b2220696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/erasure-object.go

@ -328,7 +328,9 @@ func (er erasureObjects) getObjectWithFileInfo(ctx context.Context, bucket, obje
}
if scan != madmin.HealUnknownScan {
healOnce.Do(func() {
if _, healing := er.getOnlineDisksWithHealing(); !healing {
go healObject(bucket, object, fi.VersionID, scan)
}
})
}
}
@ -438,8 +440,10 @@ func (er erasureObjects) getObjectFileInfo(ctx context.Context, bucket, object s
// if missing metadata can be reconstructed, attempt to reconstruct.
if missingBlocks > 0 && missingBlocks < readQuorum {
if _, healing := er.getOnlineDisksWithHealing(); !healing {
go healObject(bucket, object, fi.VersionID, madmin.HealNormalScan)
}
}
return fi, metaArr, onlineDisks, nil
}

Loading…
Cancel
Save