-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DRAFT] Raft Improvements #5951
base: main
Are you sure you want to change the base?
Conversation
b8fd361
to
40ed4da
Compare
40ed4da
to
466aa73
Compare
server/raft.go
Outdated
@@ -3619,6 +3613,17 @@ func (n *raft) processAppendEntryResponse(ar *appendEntryResponse) { | |||
n.stepdownLocked(noLeader) | |||
n.Unlock() | |||
arPool.Put(ar) | |||
return | |||
} else if ar.term < n.term { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this else, just normal if here since you return from the previous block.
466aa73
to
11dd1f6
Compare
@ReubenMathew it would be helpful to share a short summary of what the change addresses. |
Signed-off-by: reubenninan <reuben@nats.io>
No need to set term if granting vote since receiving a request with a higher or lower term is handled earlier in this method. Signed-off-by: reubenninan <reuben@nats.io>
6373dd5
to
4b77836
Compare
I am still chewing on one of the changes; the one related to AppendEntries response handling is theoretically correct, but it's breaking a lot of unit tests. There's some behavior I'm not accounting for... I will update the PR and take it out of draft when I figure it out. |
Signed-off-by: reubenninan <reuben@nats.io>
DRAFT