Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add logging to empty bloom #13502

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/bloomgateway/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ func (p *processor) processBlock(_ context.Context, bq *bloomshipper.CloseableBl
iters = append(iters, it)
}

fq := blockQuerier.Fuse(iters, p.logger)
logger := log.With(p.logger, "block", bq.BlockRef.String())
fq := blockQuerier.Fuse(iters, logger)

start := time.Now()
err = fq.Run()
Expand Down
17 changes: 13 additions & 4 deletions pkg/storage/bloom/v1/fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,24 @@ func (fq *FusedQuerier) runSeries(schema Schema, series *SeriesWithOffsets, reqs

// Test each bloom individually
bloom := fq.bq.blooms.At()
for j, req := range reqs {
// TODO(owen-d): this is a stopgap to avoid filtering broken blooms until we find their cause.
// In the case we don't have any data in the bloom, don't filter any chunks.
if bloom.ScalableBloomFilter.Count() == 0 {

// TODO(owen-d): this is a stopgap to avoid filtering broken blooms until we find their cause.
// In the case we don't have any data in the bloom, don't filter any chunks.
if bloom.ScalableBloomFilter.Count() == 0 {
level.Warn(fq.logger).Log(
"Found bloom with no data",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Found bloom with no data",
"msg", "found bloom with no data",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"offset_page", offset.Page,
"offset_bytes", offset.ByteOffset,
)

for j := range reqs {
for k := range inputs[j].InBlooms {
inputs[j].found[k] = true
}
}
}

for j, req := range reqs {
// shortcut: series level removal
// we can skip testing chunk keys individually if the bloom doesn't match
// the query.
Expand Down
Loading