QQ gets into inconsistent state by add_member in pre_vote state #6511
-
A quorum queue crashes and gets into an inconsistent state regarding its members when a member change is attempted while there is no quorum and no elected leader. RabbitMQ version main at ed7f5c2 with Steps to reproduce: 3 node cluster with 1 quorum queue leader on node 2
shell log
in another shell:
At this point the ra server processes are up on all 3 nodes but the queue entry in trying add member again fails.
node 1 log: qq_add_member_crash.txt |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 9 replies
-
I'm curious if this represents a real-world issue or just some testing. It seems like a Bad Idea to stop a raft member and then do membership changes. I'm sure @kjnilsson will have more to ask/say. |
Beta Was this translation helpful? Give feedback.
-
If there is no quorum and elected leader you cannot perform cluster membership changes since they go through Raft log. Ra intentionally limits cluster membership changes to one at a time (so do some other Raft implementations). So this is at least in part by design. |
Beta Was this translation helpful? Give feedback.
-
I think the issue we see here is one of unclear sources of truth. One may think that mnesia is the source of truth in RabbitMQ and for classic queues that is the case mostly but for quorum queues and streams mnesia is more of a view of the source of truth. In this case the source of truth of the actual QQ membership is the quorum queue itself, not mnesia and in this instance, because the membership change did not complete in the QQ the two have diverged. that is why we have functions like this one where we periodically check if the actual leader has diverged from what is in mnesia and then updates mnesia as necessary. I think we need to also check that the configured nodes are in sync in order to repair a diverged situation. |
Beta Was this translation helpful? Give feedback.
-
I also saw a similar issue in 3.10.10 while testing. Here are some observations:
But
I'm still trying to get minimal reproduction steps, but IIRC, what I did was:
I repeated steps 2-4 a few times. |
Beta Was this translation helpful? Give feedback.
-
@michaelklishin @kjnilsson I've had this discussion in my TODO list for a while. Should we promote it to a real issue in |
Beta Was this translation helpful? Give feedback.
-
FWIW couldn't reproduce this issue on the current main, 4ec0ca9. |
Beta Was this translation helpful? Give feedback.
main
has periodic re-evaluation of QQ replicas #8218, as suggested above :)