mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-06 06:07:11 +02:00
* Fix storage/remote.pool interned refs count and flaky test I saw TestIntern_MultiRef_Concurrent failing on a different PR saying 'expected refs to be 1 but it was 2'. I took a look, and it definitely can be racy, especially with a time.Sleep() of just 1ms. I'm fixing that by explicitly waiting until it has been released, and by repeating that 1000 times, otherwise it's just a recipe for a future flaky test. OTOH, I also took a look at the implementation and saw that we were not holding the RLock() when increasing the references count, so when releasing there was a race condition for the cleanup, I fixed that by holding RLock() while increasing the references count. Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com> * s/Equalf/Equal/ Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com> --------- Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com> |
||
---|---|---|
.. | ||
remote | ||
buffer_test.go | ||
buffer.go | ||
errors_test.go | ||
errors.go | ||
fanout_test.go | ||
fanout.go | ||
generic.go | ||
interface_test.go | ||
interface.go | ||
lazy.go | ||
memoized_iterator_test.go | ||
memoized_iterator.go | ||
merge_test.go | ||
merge.go | ||
noop.go | ||
secondary.go | ||
series_test.go | ||
series.go |