Merge pull request #2973 from tomwilkie/2969-negative-shards

Prevent number of remote write shards from going negative.
pull/2628/head
Fabian Reinartz 7 years ago committed by GitHub
commit bc2e9459d8

@ -339,6 +339,8 @@ func (t *QueueManager) calculateDesiredShards() {
numShards := int(math.Ceil(desiredShards))
if numShards > t.cfg.MaxShards {
numShards = t.cfg.MaxShards
} else if numShards < 1 {
numShards = 1
}
if numShards == t.numShards {
return

Loading…
Cancel
Save