Skip to content

[v24.3.x] r/consensus: do not block leadership completely in maintenance mode #26177

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

Open
wants to merge 7 commits into
base: v24.3.x
Choose a base branch
from

Conversation

mmaslankaprv
Copy link
Member

Backport of PR #23974

@mmaslankaprv mmaslankaprv added this to the v24.3.x-next milestone May 16, 2025
@mmaslankaprv mmaslankaprv added the kind/backport PRs targeting a stable branch label May 16, 2025
@mmaslankaprv mmaslankaprv force-pushed the manual-backport-23974-v24.3.x-380 branch from 2db585f to 52a528c Compare May 29, 2025 06:35
@mmaslankaprv mmaslankaprv marked this pull request as ready for review May 29, 2025 06:38
@mmaslankaprv mmaslankaprv force-pushed the manual-backport-23974-v24.3.x-380 branch from 52a528c to 23746df Compare May 29, 2025 10:36
Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit a9922a5)
Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit 00f27d9)
In Raft it is a common operation to access ids of all nodes from the
group configuration. Previously every time caller called `all_node_ids`
it built the vector of unique vnodes. Caching the value makes is much
more convenient to access/iterate over all replicas as it doesn't
require any copy or allocation.

Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit 46688af)
Refactored voter priority tracking by moving it from the raft protocol
implementation. The voter priority may be handled outside of
`consensus`.

Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit 3189c03)
Change the readiness for election to be handled inside of raft priority
tracker rather than leaking the priority internals outside of raft
protocol.

Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit 319843c)
Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit ca94cfa)
The maintenance mode should never completely prevent the leader of the
raft group to be elected. Even if the only possible leader candidate is
in maintenance mode. Change the leadership blocking logic to use the min
voter priority. This way the replica with blocked leadership can still
become a leader if it is the only eligible candidate.

Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit cb0e2f5)
@mmaslankaprv mmaslankaprv force-pushed the manual-backport-23974-v24.3.x-380 branch from 23746df to e4da46c Compare June 3, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v24.3.x] r/consensus: do not block leadership completely in maintenance mode
1 participant