Skip to content

Commit

Permalink
Update pkg/bloomgateway/client.go
Browse files Browse the repository at this point in the history
Co-authored-by: Owen Diehl <[email protected]>
  • Loading branch information
chaudum and owen-d committed Apr 5, 2024
1 parent 2a5c0d4 commit 41808ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/bloomgateway/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (c *GatewayClient) FilterChunks(ctx context.Context, tenant string, from, t
// overlap on instances to the left and right of the range.
firstFp, lastFp := groups[0].Fingerprint, groups[len(groups)-1].Fingerprint
pctKeyspace := float64(lastFp-firstFp) / float64(math.MaxUint64)
pctInstances := float64(len(servers)) / float64(len(c.pool.Addrs()))
pctInstances := float64(len(servers)) / float64(max(1,len(c.pool.Addrs())))
cacheLocalityScore := pctKeyspace / pctInstances
c.metrics.cacheLocalityScore.Observe(cacheLocalityScore)
}
Expand Down

0 comments on commit 41808ee

Please sign in to comment.