From ca373a575576df6c1afb59b662906bbcf3a4b125 Mon Sep 17 00:00:00 2001 From: Quentin Bisson Date: Mon, 10 Jun 2024 11:58:44 +0200 Subject: [PATCH] Update pkg/monitoring/prometheusagent/sharding/sharding.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Théo Brigitte --- pkg/monitoring/prometheusagent/sharding/sharding.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/monitoring/prometheusagent/sharding/sharding.go b/pkg/monitoring/prometheusagent/sharding/sharding.go index bdf71289..f462bfb9 100644 --- a/pkg/monitoring/prometheusagent/sharding/sharding.go +++ b/pkg/monitoring/prometheusagent/sharding/sharding.go @@ -32,7 +32,7 @@ func (pass ShardingStrategy) ComputeShards(currentShardCount int, timeSeries flo // Compute Scale Down if currentShardCount > desiredShardCount { - // We get the rest of a division of timeSeries by shardStep and we compare it with the scale down threshold + // Check if the remaining time series from ( timeSeries mod ScaleupSeriesCount ) is bigger than the scale down threshold. if math.Mod(timeSeries, pass.ScaleUpSeriesCount) > pass.ScaleUpSeriesCount-shardScaleDownThreshold { desiredShardCount = currentShardCount }