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

Fix leader partition edge case #183

Merged
merged 3 commits into from Apr 10, 2020
Merged

Conversation

tylertreat
Copy link
Member

Send the leader epoch on replication requests. When a partition leader
receives a replication request, check that the leader epoch is the
current leader's epoch. If not, drop the request.

This fixes an edge case where a leader is partitioned from the rest of
the ISR and a new partition leader is elected. Previously, both the old
leader and new leader would receive the replication requests. Followers
would reject responses from the old leader, but the old leader would
still commit messages due to the replication requests sent by followers
and stay in a zombie state.

Send the leader epoch on replication requests. When a partition leader
receives a replication request, check that the leader epoch is the
current leader's epoch. If not, drop the request.

This fixes an edge case where a leader is partitioned from the rest of
the ISR and a new partition leader is elected. Previously, both the old
leader and new leader would receive the replication requests. Followers
would reject responses from the old leader, but the old leader would
still commit messages due to the replication requests sent by followers
and stay in a zombie state.
@tylertreat tylertreat merged commit 7e7471b into master Apr 10, 2020
@tylertreat tylertreat deleted the fix_leader_partition_edge_case branch April 10, 2020 23:19
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.

None yet

1 participant