Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store: fix a small house-keeping data race (thanos-io#1951)
`stats` is being accessed from the goroutines inside this function so it needs to be protected here in the same way with `mtx`. Move the house keeping out of the inner loop into the outer one to reduce the number of times we will need to lock/unlock the mutex. Signed-off-by: Giedrius Statkevičius <[email protected]>
- Loading branch information