From 631cff345cdab110202d757572fbbf8088c0be87 Mon Sep 17 00:00:00 2001 From: "loki-gh-app[bot]" <160051081+loki-gh-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:01:31 +0100 Subject: [PATCH] fix(blooms): Skip multi-tenant TSDBs during bloom planning (backport k227) (#14888) Co-authored-by: Salva Corts --- pkg/bloombuild/planner/planner.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/bloombuild/planner/planner.go b/pkg/bloombuild/planner/planner.go index 33f0bf64c833b..7c13dedb50452 100644 --- a/pkg/bloombuild/planner/planner.go +++ b/pkg/bloombuild/planner/planner.go @@ -405,7 +405,6 @@ func (p *Planner) computeTasks( // Resolve TSDBs tsdbs, err := p.tsdbStore.ResolveTSDBs(ctx, table, tenant) if err != nil { - level.Error(logger).Log("msg", "failed to resolve tsdbs", "err", err) return nil, nil, fmt.Errorf("failed to resolve tsdbs: %w", err) } @@ -664,9 +663,14 @@ func (p *Planner) loadTenantTables( } for tenants.Next() && tenants.Err() == nil && ctx.Err() == nil { - p.metrics.tenantsDiscovered.Inc() tenant := tenants.At() + if tenant == "" { + // Tables that have not been fully compacted yet will have multi-tenant TSDBs for which the tenant is "" + // in this case we just skip the tenant + continue + } + p.metrics.tenantsDiscovered.Inc() if !p.limits.BloomCreationEnabled(tenant) { level.Debug(p.logger).Log("msg", "bloom creation disabled for tenant", "tenant", tenant) continue