Commit Graph
8 Commits
Author SHA1 Message Date
Song Bian 81b83b155f fix(mq): copy flush buffers before queuing follower data (#13183)
* fix(mq): copy flush buffers before queuing follower data

* fix(buffered_queue): release references after dequeue
2026-11-30 15:33:06 -08:00
Song BianandMaster ac2efbac01 fix(buffered_queue): synchronize enqueue with input closure (#13168)
Check isClosed while holding the queue mutex so the check and insertion are atomic with respect to CloseInput. This prevents a producer from successfully enqueueing after a consumer has exited a closed, empty queue.

Add concurrent enqueue, close, and drain coverage with a bounded wait, plus checks for both sequential close orderings. The concurrent regression reproduces the original data race and stranded item under the race detector.

Co-authored-by: Master <Master@node0.8m510.lpad-pg0.utah.cloudlab.us>
2026-11-30 13:48:52 -08:00
chrislu a5645d50a7 ensure head index is within range 2024-05-05 12:20:08 -07:00
chrislu d935f70e3c shutdown follower when leader stops 2024-04-01 22:32:30 -07:00
chrislu 1b4484bf0a go fmt 2024-02-29 09:38:52 -08:00
chrislu b6c5e57c30 read will block if no items 2024-01-28 13:10:34 -08:00
chrislu 5dc1362bdc close the input 2024-01-27 16:12:49 -08:00
Chris Lu b6de35cdb2 moved. there are some deadlock. WIP 2024-01-27 13:51:19 -08:00