Skip to content

NRG: Success signaling & stepdown during catchup #7151

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

Merged
merged 2 commits into from
Aug 7, 2025

Conversation

MauriceVanVeen
Copy link
Member

@MauriceVanVeen MauriceVanVeen commented Aug 6, 2025

This PR fixes some potential issues with our Raft replication:

  • Could technically do a divide by zero in n.Applied(index), now guarding against that. As well as recalculating n.bytes after n.truncateWAL(term, index).
  • Grab ae.lterm from the append entry earlier, and stepdown from leader or candidate if a higher term is detected during catchup.
  • Handle case where catchup is canceled but we still receive an entry from a previous catchup, in which case we ignore that entry.
  • Don't signal success/non-success after a mismatch. This could result in wrongfully providing quorum when having an outdated log.

Signed-off-by: Maurice van Veen [email protected]

@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner August 6, 2025 14:37
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander neilalexander merged commit 9ba82c9 into main Aug 7, 2025
48 checks passed
@neilalexander neilalexander deleted the maurice/nrg-partial-quorum branch August 7, 2025 08:53
neilalexander added a commit that referenced this pull request Aug 13, 2025
Includes the following:

- #7140
- #7142
- #7145
- #7150
- #7151
- #7154
- #7156
- #7122
- #7166 (excluding the Go
version bump)
- #7162
- #7165

Signed-off-by: Neil Twigg <[email protected]>
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.

3 participants