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
Raft leader sometimes does not update commitIndex even if the records are replicated to a quorum #8324
Labels
kind/bug
Categorizes an issue or PR as a bug
severity/mid
Marks a bug as having a noticeable impact but with a known workaround
support
Marks an issue as related to a customer support request
version:1.3.0
Marks an issue as being completely or in parts released in 1.3.0
Comments
npepinpe
added
support
Marks an issue as related to a customer support request
Impact: Availability
severity/mid
Marks a bug as having a noticeable impact but with a known workaround
labels
Dec 8, 2021
Received more detailed log with trace level. It gives some more idea on why the "ack" got lost. Actually the ack is not lost. But it is send after a delay.
Here the AppendRequest is received, at 16:40:44
But the ack is sent only at 16:40:53 after more than 5s. By this time leader will timeout the request. I think the reason for this delay is that raft thread is blocked as described in #8281 |
9 tasks
This was referenced Dec 20, 2021
ghost
pushed a commit
that referenced
this issue
Dec 20, 2021
ghost
pushed a commit
that referenced
this issue
Dec 20, 2021
8411: Release 1.1.8 r=npepinpe a=npepinpe ## Description This PR includes improvements/fixes to the release pipeline, as well as the release commits preparing for the next patch release. The `.gocompat.json` file is expected to be modified since the ordering changes, but that's a unfortunate side effect of the tool. It's still the same, and is checked by the pipeline (both release and test) beforehand. 8434: [Backport stable/1.1] Ensure leader always commits when replicated to quorum r=deepthidevaki a=github-actions[bot] # Description Backport of #8357 to `stable/1.1`. closes #8324 Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com> Co-authored-by: camunda-jenkins <ci@camunda.com> Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
korthout
added
the
version:1.3.0
Marks an issue as being completely or in parts released in 1.3.0
label
Jan 4, 2022
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Categorizes an issue or PR as a bug
severity/mid
Marks a bug as having a noticeable impact but with a known workaround
support
Marks an issue as related to a customer support request
version:1.3.0
Marks an issue as being completely or in parts released in 1.3.0
Describe the bug
Found this strange behavior when investigating a support ticket. https://jira.camunda.com/browse/SUPPORT-12321
The main issue is that that after a failover, there is no leader for a partition when queried via
zbctl status
From the logs:
After a failover, new leader is elected - broker 1. Hence the transition to leader is not completed and no Zeebe services are installed.
Analyzed heap dump I observed the following state in the leader:
lastAppendedEntry
is the InitialEntry at term 39 and index 38. Indicating that it is not marked as committed.Looking at the followers state, all of them have received the InitialEntry record at index 38.
Leader keeps a map of follower -> RaftMemberContext to keep track of follower's state.
RaftMemberContext for the followers shows there are no pending inflight requests (ruling out previous issues we have seen where we observed there were inflight requests that never gets completed or time out).
RaftMemberContext.matchIndex = 38
for all followers.This means that the leader can commit the record at index 38. But we see that the commitIndex is 37.
In the logs we see following error:
After that there are no errors, and there are no new leader elections happening. This means that both leaders and followers are able to communicate with each other.
After investigating further, I believe the problem is here:
https://github.com/camunda-cloud/zeebe/blob/6ffc0cb40ad355daf2b97882aa4db35765f41382/atomix/cluster/src/main/java/io/atomix/raft/roles/LeaderAppender.java#L208-L210
Consider the following scenario:
AppendRequest {lastLogIndex = 38, commitIndex = 37}
)AppendResponse{success=true, lastLogIndex=38}
because they have already received record at index 38request.entries()
is empty.To Reproduce
I did not reproduce it yet. We have to find a way to simulate the scenario described above.
Expected behavior
Leader should commit as long as there is a quorum.
Environment:
The text was updated successfully, but these errors were encountered: