-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r/consensus: break _op_lock when stopping consensus
When raft stops the last step in stop sequence is closing gate. After gate is closed all the background futures are guaranteed to be finished. However it may happen that the fiber is waiting for an `_op_lock` while gate is being closed. We need to make sure that when gate is closed no other fiber can acquire the `_op_lock`. Marking `_op_lock` mutex as broken prevents all waiters for acquiring a mutex and at the same time accessing `consensus` state. Fixes: #5759 Signed-off-by: Michal Maslanka <michal@redpanda.com>
- Loading branch information
1 parent
acde644
commit ab31867
Showing
1 changed file
with
78 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters