Ensure safety of transitionState at startup (#16563)

This commit is contained in:
Krishnan Parthasarathi
2023-02-07 23:11:42 -08:00
committed by GitHub
parent d8daabae9b
commit 990fc415f7
2 changed files with 21 additions and 11 deletions

View File

@@ -323,6 +323,7 @@ func initAllSubsystems(ctx context.Context) {
// Create new ILM tier configuration subsystem
globalTierConfigMgr = NewTierConfigMgr()
globalTransitionState = newTransitionState(GlobalContext)
globalSiteResyncMetrics = newSiteResyncMetrics(GlobalContext)
}
@@ -674,8 +675,7 @@ func serverMain(ctx *cli.Context) {
// Initialize background replication
initBackgroundReplication(GlobalContext, newObject)
// Initialize background transition
initBackgroundTransition(GlobalContext, newObject)
globalTransitionState.Init(newObject)
// Initialize batch job pool.
globalBatchJobPool = newBatchJobPool(GlobalContext, newObject, 100)