Skip to content

Commit c263a68

Browse files
authored
fix: add logging to empty bloom (#13502)
1 parent bfa6955 commit c263a68

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

pkg/bloomgateway/processor.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ func (p *processor) processBlock(_ context.Context, bq *bloomshipper.CloseableBl
167167
iters = append(iters, it)
168168
}
169169

170-
fq := blockQuerier.Fuse(iters, p.logger)
170+
logger := log.With(p.logger, "block", bq.BlockRef.String())
171+
fq := blockQuerier.Fuse(iters, logger)
171172

172173
start := time.Now()
173174
err = fq.Run()

pkg/storage/bloom/v1/fuse.go

+13-4
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,24 @@ func (fq *FusedQuerier) runSeries(schema Schema, series *SeriesWithOffsets, reqs
299299

300300
// Test each bloom individually
301301
bloom := fq.bq.blooms.At()
302-
for j, req := range reqs {
303-
// TODO(owen-d): this is a stopgap to avoid filtering broken blooms until we find their cause.
304-
// In the case we don't have any data in the bloom, don't filter any chunks.
305-
if bloom.ScalableBloomFilter.Count() == 0 {
302+
303+
// TODO(owen-d): this is a stopgap to avoid filtering broken blooms until we find their cause.
304+
// In the case we don't have any data in the bloom, don't filter any chunks.
305+
if bloom.ScalableBloomFilter.Count() == 0 {
306+
level.Warn(fq.logger).Log(
307+
"msg", "Found bloom with no data",
308+
"offset_page", offset.Page,
309+
"offset_bytes", offset.ByteOffset,
310+
)
311+
312+
for j := range reqs {
306313
for k := range inputs[j].InBlooms {
307314
inputs[j].found[k] = true
308315
}
309316
}
317+
}
310318

319+
for j, req := range reqs {
311320
// shortcut: series level removal
312321
// we can skip testing chunk keys individually if the bloom doesn't match
313322
// the query.

0 commit comments

Comments
 (0)