Coordinator: swapNode() should keep retrying leader election until it succeeds#781
Merged
merlimat merged 2 commits intooxia-db:mainfrom Oct 24, 2025
Merged
Conversation
… succeeds Signed-off-by: Matteo Merli <mmerli@apache.org>
Member
|
Hi, @merlimat |
Collaborator
Author
Yes, though that looks quite too big of a change. It's not easy to understand all the implications. I'd prefer to punctually fix the current issues. If a refactor is needed, I'd do that outside of the scope of fixing the issues. |
Collaborator
Author
|
Merging for now as I have more changes depending on this |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#845
During
SwapNode()operation for rebalancing we're triggering a new leader election. If that leader election fails, the coordinator is not handling the retries (unlike the case where the leader election is triggered by a node failure).The
SwapNode()should actually block and wait until the leader election finally succeeds, so that we don't move on to swap other shards.