Skip to content

ra_server: Evaluate member promotion in #install_snapshot_result{}#584

Merged
michaelklishin merged 1 commit intomainfrom
md/install-snapshot-promote
Mar 3, 2026
Merged

ra_server: Evaluate member promotion in #install_snapshot_result{}#584
michaelklishin merged 1 commit intomainfrom
md/install-snapshot-promote

Conversation

@the-mikedavis
Copy link
Copy Markdown
Collaborator

@the-mikedavis the-mikedavis commented Mar 2, 2026

Currently, promotable members can get "stuck" as promotable until the next command is appended if they join the cluster and only install a snapshot from the leader. We can evaluate promoting the peer when handling #install_snapshot_result{} to ensure the member becomes a voter.

I haven't been able to reproduce this yet but I've seen this in the wild with RabbitMQ 4.2.0:

[
{"Node Name":"rabbit@<node1>","Raft State":"follower","Membership":"promotable","Last Log Index":219,"Last Written":219,"Last Applied":219,"Commit Index":219,"Snapshot Index":219,"Term":1,"Machine Version":7}
,{"Node Name":"rabbit@<node2>","Raft State":"follower","Membership":"voter","Last Log Index":219,"Last Written":219,"Last Applied":219,"Commit Index":219,"Snapshot Index":219,"Term":1,"Machine Version":7}
,{"Node Name":"rabbit@<node3>","Raft State":"leader","Membership":"voter","Last Log Index":219,"Last Written":219,"Last Applied":219,"Commit Index":219,"Snapshot Index":219,"Term":1,"Machine Version":7}
]

I'll look at writing a test... ✔️

@the-mikedavis the-mikedavis requested a review from kjnilsson March 2, 2026 16:05
@the-mikedavis the-mikedavis self-assigned this Mar 2, 2026
@kjnilsson
Copy link
Copy Markdown
Contributor

make sense! thanks

@the-mikedavis the-mikedavis force-pushed the md/install-snapshot-promote branch from 945ac4d to fabff69 Compare March 2, 2026 16:33
@the-mikedavis the-mikedavis marked this pull request as ready for review March 2, 2026 16:33
@the-mikedavis the-mikedavis force-pushed the md/install-snapshot-promote branch 2 times, most recently from 59b288f to d16be00 Compare March 2, 2026 16:46
Currently, promotable members can get "stuck" as promotable until the
next command is appended if they join the cluster and only install a
snapshot from the leader. We can evaluate promoting the peer when
handling `#install_snapshot_result{}` to ensure the member becomes a
voter.
@the-mikedavis the-mikedavis force-pushed the md/install-snapshot-promote branch from d16be00 to e373a64 Compare March 2, 2026 22:29
@michaelklishin michaelklishin merged commit 153810b into main Mar 3, 2026
7 checks passed
@michaelklishin michaelklishin added this to the 3.0.0 milestone Mar 3, 2026
@michaelklishin michaelklishin deleted the md/install-snapshot-promote branch March 3, 2026 23:37
michaelklishin added a commit that referenced this pull request Mar 3, 2026
…omote

ra_server: Evaluate member promotion in `#install_snapshot_result{}` (backport #584)
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.

3 participants