mirror of
https://github.com/prometheus/prometheus
synced 2024-12-29 10:12:26 +00:00
bfb1500a38
If a queue is stopped and one of its shards happens to hit the batch_send_deadline at the same time a deadlock can occur where stop holds the mutex and will not release it until the send is finished, but the send needs the mutex to retrieve the most recent batch. This is fixed by using a second mutex just for writing. In addition, the test I wrote exposed a case where during shutdown a batch could be sent twice due to concurrent calls to queue.Batch() and queue.FlushAndShutdown(). Protect these with a mutex as well. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com> |
||
---|---|---|
.. | ||
remote | ||
buffer_test.go | ||
buffer.go | ||
fanout_test.go | ||
fanout.go | ||
generic.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 |