Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: deadlock when stopping follower #927

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

spuun
Copy link
Member

@spuun spuun commented Jan 30, 2025

WHAT is this pull request doing?

Fixes #926

HOW can this pull request be tested?

Run added spec

spuun added 2 commits January 30, 2025 11:34
If the queue is full append actions are blocked, and this block is
happening in the `Clustering::Server`'s lock. If the follower
disconnects we'll get an IO::Error in the action loop which is rescued
by `Clustering::Server` which will try to lock to remove the follower
from the follower list. Because the lock is held by an append deadlock
occurs.

By closing the channel in the end of the action loop we ensure that
blocked append actions are aborted and the lock is released.
@spuun spuun requested a review from a team as a code owner January 30, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clients stop consuming/producing after a follower is stopped when cluster is under high load
1 participant