From 76d35cc97f0cca4cd0375f5003a4028eec9cf654 Mon Sep 17 00:00:00 2001 From: Salva Corts Date: Tue, 5 Nov 2024 14:49:33 +0100 Subject: [PATCH] fix(blooms): Skip multi-tenant TSDBs during bloom planning (#14770) --- 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 33f0bf64c833..7c13dedb5045 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