fix: close the channel appropriately for dataUsageEntry (#12432)

Bonus: initialize dataScanner routines after server
config has initialized.

fixes #12430
This commit is contained in:
Harshavardhana
2021-06-03 19:18:59 -07:00
committed by GitHub
parent 3109441258
commit c0e79e28b2
2 changed files with 4 additions and 1 deletions

View File

@@ -531,7 +531,6 @@ func serverMain(ctx *cli.Context) {
}
initBackgroundExpiry(GlobalContext, newObject)
initDataScanner(GlobalContext, newObject)
if err = initServer(GlobalContext, newObject); err != nil {
var cerr config.Err
@@ -549,6 +548,8 @@ func serverMain(ctx *cli.Context) {
logger.LogIf(GlobalContext, err)
}
initDataScanner(GlobalContext, newObject)
if globalIsErasure { // to be done after config init
initBackgroundReplication(GlobalContext, newObject)
globalTierJournal, err = initTierDeletionJournal(GlobalContext.Done())