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
fix(raft): do not handle response if role is already closed #10640
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deepthidevaki
force-pushed
the
dd-10545-fix-raft
branch
from
October 10, 2022 07:51
749a672
to
11a58e4
Compare
oleschoenburg
approved these changes
Oct 10, 2022
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.
Nice catch! 🚀
bors merge |
Build succeeded: |
Backport failed for Please cherry-pick the changes locally. git fetch origin stable/8.0
git worktree add -d .worktree/backport-10640-to-stable/8.0 origin/stable/8.0
cd .worktree/backport-10640-to-stable/8.0
git checkout -b backport-10640-to-stable/8.0
ancref=$(git merge-base 56dd345b2aae4ff4a39193a6f8c4e707e7afea69 11a58e45538b8fc51222eb2e5760bd8897a74fda)
git cherry-pick -x $ancref..11a58e45538b8fc51222eb2e5760bd8897a74fda |
Successfully created backport PR #10656 for |
zeebe-bors-camunda bot
added a commit
that referenced
this pull request
Oct 10, 2022
10657: [Backport stable/8.0] ci: merge deploy and auto-merge workflows into unified CI workflow r=oleschoenburg a=oleschoenburg manual backport of #10616 10659: [Backport stable/8.0] fix(raft): do not handle response if the role is closed r=oleschoenburg a=deepthidevaki ## Description Backports #10640 Changes to the `ControlledRaftContext` is not backported as the original code does not exist in this version. closes #10545 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com> Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
korthout
added
the
version:8.1.1
Marks an issue as being completely or in parts released in 8.1.1
label
Oct 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The response to a request send when the node was in leader in a specific term, was processed even if the response was received in a later term. This resulted in following behavior:
RaftMemberContext#inFlightAppendCount
to 1.inFlightAppendCount
is reset to 0inFlightAppendCount
is set to 1RaftMemberContext#canAppend
returns false because inFlightAppendCount != 0. As a result leader will never sent a heartbeat or new append request to the follower.To fix this, the check for if the role is open is done before processing the response. As a precaution, other requests where the response is handled without checking for open is also updated.
Related issues
closes #10545
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation:
Please refer to our review guidelines.