Skip to content

Commit

Permalink
Switch to last shard
Browse files Browse the repository at this point in the history
  • Loading branch information
mdisibio committed Jan 12, 2024
1 parent bf1de06 commit afcd24c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/frontend/query_range_sharding.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,10 @@ func (s *queryRangeSharder) generatorRequest(searchReq tempopb.QueryRangeRequest
searchReq.QueryMode = "recent"

// No sharding on the generators (unecessary), but we do apply sampling

Check failure on line 397 in modules/frontend/query_range_sharding.go

View workflow job for this annotation

GitHub Actions / Lint

`unecessary` is a misspelling of `unnecessary` (misspell)
// rates. In this case we always execute the first shard.
searchReq.ShardID = 1
// rates. In this case we execute a single arbitrary shard. Choosing
// the last shard works. The first shard should be avoided because it is
// weighted slightly off due to int63/128 sharding boundaries.
searchReq.ShardID = uint32(1.0 / samplingRate)
searchReq.ShardCount = uint32(1.0 / samplingRate)

// Set final sampling rate after integer rounding
Expand Down

0 comments on commit afcd24c

Please sign in to comment.