Add QueueBundle.Remove() to stop and remove queues#1235
Add QueueBundle.Remove() to stop and remove queues#1235tigrato wants to merge 1 commit intoriverqueue:masterfrom
Conversation
|
Cool! Thx. A few small asks on this one:
Anything else you want to add @bgentry? |
While doing a little work on #1235, my LLM flagged that the way that we're accessing `producersByQueueName` today is already a little unsafe as it may be read in multiple places concurrently. There's a mutex to protect it somewhat in the `QueueBundle`, but it may still race between a change there a "notify producer" send. Here, add one additional `RWMutex` that makes sure to synchronize read access on the map.
While doing a little work on #1235, my LLM flagged that the way that we're accessing `producersByQueueName` today is already a little unsafe as it may be read in multiple places concurrently. There's a mutex to protect it somewhat in the `QueueBundle`, but it may still race between a change there a "notify producer" send. Here, add one additional `RWMutex` that makes sure to synchronize read access on the map.
|
And actually, while looking at this discovered a minor concurrency bug around producer map access. I patched that in #1236 — can you rebase, and make sure to lock that mutex in the |
|
@brandur thank your for the review. changes pushed. |
Adds dynamic queue removal at runtime. When removed, the queue's producer is stopped and jobs can no longer be worked on that queue. Queues can be re-added after removal. Signed-off-by: Tiago Silva <3629062+tigrato@users.noreply.github.com>
Adds dynamic queue removal at runtime. When removed, the queue's producer is stopped and jobs can no longer be worked on that queue. Queues can be re-added after removal.