Skip to content

Commit 0b84acd

Browse files
Merge pull request #11515 from rabbitmq/issue-11514
Handle unknown QQ state
2 parents 7c2d29d + bfedfdc commit 0b84acd

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

deps/rabbit/src/rabbit_quorum_queue.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ all_replica_states() ->
404404
{K, promotable};
405405
({K, follower, non_voter}) ->
406406
{K, non_voter};
407-
({K, S, voter}) ->
407+
({K, S, _}) ->
408+
%% voter or unknown
408409
{K, S};
409410
(T) ->
410411
T

deps/rabbit/test/unit_quorum_queue_SUITE.erl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,18 @@ all_replica_states_includes_nonvoters(_Config) ->
5353
{q1, leader, voter},
5454
{q2, follower, voter},
5555
{q3, follower, promotable},
56+
{q4, init, unknown},
5657
%% pre ra-2.7.0
57-
{q4, leader},
58-
{q5, follower}
58+
{q5, leader},
59+
{q6, follower}
5960
]),
6061
{_, #{
6162
q1 := leader,
6263
q2 := follower,
6364
q3 := promotable,
64-
q4 := leader,
65-
q5 := follower
65+
q4 := init,
66+
q5 := leader,
67+
q6 := follower
6668
}} = rabbit_quorum_queue:all_replica_states(),
6769

6870
true = ets:delete(ra_state),

0 commit comments

Comments
 (0)