Skip to content

Commit

Permalink
Feedback from review
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
  • Loading branch information
dgzlopes committed Nov 4, 2020
1 parent 3ee6ac7 commit 3abfe92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tempodb/tempodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,13 @@ func (rw *readerWriter) pollBlocklist() {
if err != nil {
metricBlocklistErrors.WithLabelValues(tenantID).Inc()
level.Error(rw.logger).Log("msg", "error polling blocklist", "tenantID", tenantID, "err", err)
}
if len(blockIDs) == 0 {
rw.blockListsMtx.Lock()
delete(rw.blockLists, tenantID)
delete(rw.compactedBlockLists, tenantID)
rw.blockListsMtx.Unlock()
level.Error(rw.logger).Log("msg", "deleted in-memory blocklists", "tenantID", tenantID)
level.Info(rw.logger).Log("msg", "deleted in-memory blocklists", "tenantID", tenantID)
}

interfaceSlice := make([]interface{}, 0, len(blockIDs))
Expand Down

0 comments on commit 3abfe92

Please sign in to comment.