Skip to content

Commit

Permalink
store: fix race when iterating blocks (#6675)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaHoffmann authored Aug 28, 2023
1 parent 76ab183 commit 32412dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -1693,6 +1693,9 @@ func (s *BucketStore) LabelNames(ctx context.Context, req *storepb.LabelNamesReq
}

func (s *BucketStore) UpdateLabelNames() {
s.mtx.RLock()
defer s.mtx.RUnlock()

newSet := stringset.New()
for _, b := range s.blocks {
labelNames, err := b.indexHeaderReader.LabelNames()
Expand Down

0 comments on commit 32412dc

Please sign in to comment.