tiering: UpdateWorkers may be called before Init (#16573)

This commit is contained in:
Krishnan Parthasarathi 2023-02-08 19:13:34 -08:00 committed by GitHub
parent fadc46b906
commit 9de26531e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,7 +270,9 @@ func (t *transitionState) getDailyAllTierStats() DailyAllTierStats {
func (t *transitionState) UpdateWorkers(n int) {
t.mu.Lock()
defer t.mu.Unlock()
if t.objAPI == nil { // Init hasn't been called yet.
return
}
t.updateWorkers(n)
}