fix: heal bucket metadata right before healing bucket (#11097)

optimization mainly to avoid listing the entire
`.minio.sys/buckets/.minio.sys` directory, this
can get really huge and comes in the way of startup
routines, contents inside `.minio.sys/buckets/.minio.sys`
are rather transient and not necessary to be healed.
This commit is contained in:
Harshavardhana
2020-12-13 11:57:08 -08:00
committed by GitHub
parent 705e196b6c
commit 2eb52ca5f4
18 changed files with 117 additions and 112 deletions

View File

@@ -428,7 +428,7 @@ func resetGlobalIsErasure() {
func resetGlobalHealState() {
// Init global heal state
if globalAllHealState == nil {
globalAllHealState = newHealState()
globalAllHealState = newHealState(false)
} else {
globalAllHealState.Lock()
for _, v := range globalAllHealState.healSeqMap {
@@ -441,7 +441,7 @@ func resetGlobalHealState() {
// Init background heal state
if globalBackgroundHealState == nil {
globalBackgroundHealState = newHealState()
globalBackgroundHealState = newHealState(false)
} else {
globalBackgroundHealState.Lock()
for _, v := range globalBackgroundHealState.healSeqMap {