heal: Avoid spinning up object healing during startup (#8819)

auto-heal disks, metadata and buckets in background but
not objects, let the auto heal kick in for objects after
the cluster has been up for a while.
This commit is contained in:
Harshavardhana
2020-01-15 01:08:39 -08:00
committed by GitHub
parent d76518eeb9
commit 442e1698cb
3 changed files with 19 additions and 13 deletions

View File

@@ -64,6 +64,8 @@ func monitorLocalDisksAndHeal() {
// Perform automatic disk healing when a disk is replaced locally.
for {
time.Sleep(defaultMonitorNewDiskInterval)
// Attempt a heal as the server starts-up first.
localDisksInZoneHeal := make([]Endpoints, len(z.zones))
for i, ep := range globalEndpoints {
@@ -91,8 +93,6 @@ func monitorLocalDisksAndHeal() {
// Ensure that reformatting disks is finished
bgSeq.sourceCh <- nopHeal
time.Sleep(defaultMonitorNewDiskInterval)
var erasureSetInZoneToHeal = make([][]int, len(localDisksInZoneHeal))
// Compute the list of erasure set to heal
for i, localDisksToHeal := range localDisksInZoneHeal {