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

[v24.1.x] Transfer leadership before stepping down after reconfiguration #22769

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

mmaslankaprv
Copy link
Member

Backport of PR #19966

Added a missing trigger of Raft leadership notification after stepping
down when a leader node is not longer part of raft group configuration.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 8f4db30)
When a node currently being a raft group leader is not a part of new
configuration it must step down and become a follower. When stepping
down a leader stops sending heartbeats to the followers allowing them to
trigger election. The election starts only after an election timeout
elapsed on on of the followers. This makes the whole process
slow and during the whole time clients can not write and read from the
raft group as it is leaderless. To address this issue a new method of
step down was introduced. The new stepdown implementation which is
going to be used for reconfiguration requests one of the followers to
timeout immediately and trigger leader election. This speeds up the
whole process and makes it much less disruptive as the stepdown is now
comparable to leadership transfer.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 9f7a508)
Added a test validating if a leader election caused by removing leader
from the replica set takes a comparable amount of time to the leadership
transfer.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 9c58109)
@mmaslankaprv mmaslankaprv added this to the v24.1.x-next milestone Aug 7, 2024
@mmaslankaprv mmaslankaprv added the kind/backport PRs targeting a stable branch label Aug 7, 2024
@mmaslankaprv mmaslankaprv marked this pull request as ready for review August 7, 2024 09:12
@mmaslankaprv mmaslankaprv merged commit 9144399 into v24.1.x Aug 7, 2024
18 checks passed
@mmaslankaprv mmaslankaprv deleted the backport-19966-v24.1.x-462 branch August 7, 2024 12:19
@piyushredpanda piyushredpanda modified the milestones: v24.1.x-next, v24.1.15 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants