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

Do not decrement follower nextIndex below 1 #1

Closed
wants to merge 1 commit into from

Conversation

ReubenMathew
Copy link
Collaborator

If the current leader receives a unsuccessful append entry, it will
decrement the nextIndex for a follower. However, non-leaders can reject
append entry requests due to an outdated term and if the nextIndex is
already 1 because the replica log is still empty, the leader will try to
decrement nextIndex below 1.

Reported by Antithesis
Run: cfd1ec4bf99273b57cd43d73d8b5216a-17-4
Session: bbe2acf6d61b18536998f059e394f2d9-17-4

If the current leader receives a unsuccessful append entry, it will
decrement the nextIndex for a follower. However, non-leaders can reject
append entry requests due to an outdated term and if the nextIndex is
already 1 because the replica log is still empty, the leader will try to
decrement nextIndex below 1.

Reported by Antithesis
Run: cfd1ec4bf99273b57cd43d73d8b5216a-17-4
Session: bbe2acf6d61b18536998f059e394f2d9-17-4
@mprimi
Copy link
Owner

mprimi commented Aug 8, 2024

Already cherry-picked into main

@mprimi mprimi closed this Aug 8, 2024
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.

2 participants