resize replication worker pool dynamically after config update (#11737)

This commit is contained in:
Poorna Krishnamoorthy
2021-03-09 02:56:42 -08:00
committed by GitHub
parent 209fe61dcc
commit 2f29719e6b
4 changed files with 95 additions and 70 deletions

View File

@@ -80,6 +80,10 @@ func (t *apiConfig) init(cfg api.Config, setDriveCounts []int) {
t.requestsDeadline = cfg.RequestsDeadline
t.listQuorum = cfg.GetListQuorum()
t.extendListLife = cfg.ExtendListLife
if globalReplicationPool != nil &&
cfg.ReplicationWorkers != t.replicationWorkers {
globalReplicationPool.Resize(cfg.ReplicationWorkers)
}
t.replicationWorkers = cfg.ReplicationWorkers
}