rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
11.85k stars 3.9k forks source link

rabbit_quorum_queue:all_replica_states doesn't handle some member states #11514

Closed mkuratczyk closed 1 week ago

mkuratczyk commented 2 weeks ago

Describe the bug

ra_state may contain a QQ state such as {'foo',init,unknown}. Currently all_replica_states doesn't map such states to a 2-tuple which leads to a crash in maps:from_list because a 3-tuple can't be handled.

A crash in rabbit_quorum_queue:all_replica_states leads to no results being returned from a given node when the CLI asks for QQs with minimum quorum.

Ultimately, the effect is that many/all quorum queues may be considered at risk of losing quorum, because we are missing data from some of the nodes.

Reproduction steps

Run rabbitmq-queues check_if_node_is_quorum_critical on a cluster with some queues in an init/unknown state.

Expected behavior

Queues in an unhealthy state should be treated as at-risk of losing quorum but should not prevent that data about other queues from being returned.

Additional context

No response