Skip to content

Commit

Permalink
Avoid handling the error twice
Browse files Browse the repository at this point in the history
  • Loading branch information
zalegrala committed Aug 14, 2023
1 parent c19e367 commit 7c3001e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tempodb/blocklist/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (p *Poller) pollTenantAndCreateIndex(ctx context.Context, tenantID string)
// everything is happy, write this tenant index
level.Info(p.logger).Log("msg", "writing tenant index", "tenant", tenantID, "metas", len(blocklist), "compactedMetas", len(compactedBlocklist))
err = p.writer.WriteTenantIndex(derivedCtx, tenantID, blocklist, compactedBlocklist)
if err != nil && err != backend.ErrDoesNotExist {
if err != nil {
metricTenantIndexErrors.WithLabelValues(tenantID).Inc()
level.Error(p.logger).Log("msg", "failed to write tenant index", "tenant", tenantID, "err", err)
}
Expand Down

0 comments on commit 7c3001e

Please sign in to comment.