Skip to content

Commit

Permalink
fix(blooms): Skip multi-tenant TSDBs during bloom planning (backport …
Browse files Browse the repository at this point in the history
…k227) (#14888)

Co-authored-by: Salva Corts <[email protected]>
  • Loading branch information
loki-gh-app[bot] and salvacorts authored Nov 13, 2024
1 parent d10f79c commit 631cff3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/bloombuild/planner/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 631cff3

Please sign in to comment.