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): Fix candidate stepdown logic #5717

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

ReubenMathew
Copy link
Contributor

@ReubenMathew ReubenMathew commented Jul 29, 2024

Candidates should be stepping down based on their term rather than the term number of their last entry.

Signed-off-by: reubenninan reuben@nats.io

@ReubenMathew ReubenMathew requested a review from a team as a code owner July 29, 2024 20:30
@ReubenMathew
Copy link
Contributor Author

CC: @mprimi @neilalexander

@neilalexander neilalexander changed the title Fix candidate stepdown logic NRG (2.11): Fix candidate stepdown logic Jul 29, 2024
@ReubenMathew ReubenMathew force-pushed the rmn/candidate-stepdown-fix branch from cf84c4b to 1534c30 Compare July 30, 2024 02:26
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.

Otherwise LGTM.

server/raft_test.go Outdated Show resolved Hide resolved
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.

Noticed a race in CI.

server/raft_test.go Outdated Show resolved Hide resolved
@ReubenMathew ReubenMathew force-pushed the rmn/candidate-stepdown-fix branch 2 times, most recently from 401059d to 6013f9c Compare July 30, 2024 14:55
Candidates should not be stepping down based on their pterm but rather their actual term.

Signed-off-by: reubenninan <reuben@nats.io>
@ReubenMathew ReubenMathew force-pushed the rmn/candidate-stepdown-fix branch from 6013f9c to 15885b6 Compare July 30, 2024 15:31
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!

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

@derekcollison derekcollison merged commit 896cf0f into main Jul 31, 2024
5 checks passed
@derekcollison derekcollison deleted the rmn/candidate-stepdown-fix branch July 31, 2024 14:23
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