Skip to content

Commit

Permalink
Update pkg/monitoring/prometheusagent/sharding/sharding.go
Browse files Browse the repository at this point in the history
Co-authored-by: Théo Brigitte <[email protected]>
  • Loading branch information
QuentinBisson and TheoBrigitte committed Jun 22, 2024
1 parent b249e1d commit ca373a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/monitoring/prometheusagent/sharding/sharding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ca373a5

Please sign in to comment.