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

NRG (2.11): Do not revert term on truncate WAL #5975

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

neilalexander
Copy link
Member

It is never safe for the term number to go backwards for any reason, even in a truncate scenario, as this breaks the consistency guarantees and could cause us to vote again in what should be past elections if more than one node has to truncate back at the same time.

All calls to truncateWAL(...) are after the AE has bumped the term number up if needed, so this is safe for making forward progress.

Signed-off-by: Neil Twigg neil@nats.io

@neilalexander neilalexander marked this pull request as ready for review October 8, 2024 15:41
@neilalexander neilalexander requested a review from a team as a code owner October 8, 2024 15:41
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

@neilalexander
Copy link
Member Author

Force push was to add unit test BTW.

@derekcollison
Copy link
Member

derekcollison commented Oct 8, 2024

ok will wait on green and them merge.

Signed-off-by: Neil Twigg <neil@nats.io>
Co-authored-by: Maurice van Veen <github@mauricevanveen.com>
@derekcollison derekcollison merged commit 7d6782c into main Oct 8, 2024
5 checks passed
@derekcollison derekcollison deleted the neil/nrgtruncateterm branch October 8, 2024 16:56
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.

2 participants