Skip to content

Commit

Permalink
fix(blooms): Skip multi-tenant TSDBs during bloom planning (#14770)
Browse files Browse the repository at this point in the history
  • Loading branch information
salvacorts authored Nov 5, 2024
1 parent 0ce5cb8 commit 76d35cc
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 76d35cc

Please sign in to comment.