(2.12) NRG: Don't respond success to catchup messages & ignore response if not leader#6944
Merged
neilalexander merged 2 commits intomainfrom Jun 6, 2025
Merged
(2.12) NRG: Don't respond success to catchup messages & ignore response if not leader#6944neilalexander merged 2 commits intomainfrom
neilalexander merged 2 commits intomainfrom
Conversation
c10a3e9 to
648bf8f
Compare
derekcollison
approved these changes
Jun 5, 2025
Member
derekcollison
left a comment
There was a problem hiding this comment.
LGTM - One minor naming nit
2a943cf to
20a5d6f
Compare
neilalexander
approved these changes
Jun 5, 2025
Member
Author
|
Yep, seems some thinks broke since the last push. Put in draft for now. |
20a5d6f to
344604c
Compare
344604c to
7fa9e1b
Compare
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
7fa9e1b to
a7b6481
Compare
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.
Desync was observed in the Raft layer in the following scenario:
term=1and proposes 100 items,n.pterm=1.term=2and proposes 1 item, stores it in its log but it doesn't get quorum,n.pterm=2.term=3, catches up Server 3 for its missing messages from step 1 and gets quorum/commits them. Server 3 does not know yet these can be committed.n.pterm=2, n.pindex=51and Server 3 allows it to become leader because it hasn.pterm=1, n.pindex=100. Server 3 votes because theptermis higher, even though thepindexis lower.This happened because Server 3 provided quorum to Server 1 during catchup. The issue is resolved if we simply don't respond back to Server 1 and make it commit those entries. We need to fully catchup, and only afterward can we participate in achieving quorum on those entries.
This fixes some cases of desync, for example stream desync with
last sequence mismatch.Signed-off-by: Maurice van Veen github@mauricevanveen.com