Skip to content

(v2.11) Fix drift in WAL, truncate AppendEntry without quorum#5957

Merged
derekcollison merged 1 commit intomainfrom
maurice/fix-wal-drift
Oct 3, 2024
Merged

(v2.11) Fix drift in WAL, truncate AppendEntry without quorum#5957
derekcollison merged 1 commit intomainfrom
maurice/fix-wal-drift

Conversation

@MauriceVanVeen
Copy link
Copy Markdown
Member

If a RAFT leader would call storeToWal and shortly after got hard killed, it should truncate the AppendEntry since it didn't reach quorum.

This would generally already happen correctly, except for when n.pindex == ae.pindex due to the n.pterm incorrectly being updated.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Copy link
Copy Markdown
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!

@MauriceVanVeen MauriceVanVeen marked this pull request as ready for review October 3, 2024 13:37
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner October 3, 2024 13:37
@derekcollison derekcollison merged commit ef7d912 into main Oct 3, 2024
@derekcollison derekcollison deleted the maurice/fix-wal-drift branch October 3, 2024 20:12
@wallyqs wallyqs changed the title Fix drift in WAL, truncate AppendEntry without quorum (v2.11) Fix drift in WAL, truncate AppendEntry without quorum Oct 8, 2024
neilalexander added a commit that referenced this pull request Nov 25, 2024
Includes the following:

- #5661
- #5666
- #5671
- #5344
- #5684
- #5689
- #5691
- #5714
- #5717
- #5707
- #5792
- #5912
- #5957
- #5700
- #5975
- #5991
- #5987
- #6027
- #6038
- #6053
- #5848
- #6055
- #6056
- #6060
- #6061
- #6072
- #5832
- #6073
- #6107

Signed-off-by: Neil Twigg <neil@nats.io>
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