Skip to content

Commit

Permalink
Use atomic.LoadInt32() when reading back numChunks
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Pracucci <[email protected]>
  • Loading branch information
pracucci committed Jul 14, 2020
1 parent 86a66f5 commit 4d68aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/querier/blocks_store_queryable.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ func (q *blocksStoreQuerier) fetchSeriesFromStores(
return nil, nil, nil, 0, err
}

return seriesSets, queriedBlocks, warnings, int(numChunks), nil
return seriesSets, queriedBlocks, warnings, int(atomic.LoadInt32(&numChunks)), nil
}

func createSeriesRequest(minT, maxT int64, matchers []storepb.LabelMatcher, blockIDs []ulid.ULID) (*storepb.SeriesRequest, error) {
Expand Down

0 comments on commit 4d68aaa

Please sign in to comment.