Skip to content

Commit

Permalink
fix(blooms): ensure tokenizer cache is reset between series
Browse files Browse the repository at this point in the history
Signed-off-by: Owen Diehl <[email protected]>
  • Loading branch information
owen-d committed Jul 1, 2024
1 parent a14755e commit c5e3bc8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/storage/bloom/v1/bloom_tokenizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ func (bt *BloomTokenizer) newBloom() *Bloom {
}
}

// Populates a bloom filter(s) with the tokens from the given chunks.
// Called once per series
func (bt *BloomTokenizer) Populate(
blooms SizedIterator[*Bloom],
chks Iterator[ChunkRefWithIter],
ch chan *BloomCreation,
) {
clear(bt.cache) // MUST always clear the cache before starting a new series
var next bool

// All but the last bloom are considered full -- send back unaltered
Expand Down

0 comments on commit c5e3bc8

Please sign in to comment.