diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-08-22 16:00:38 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-08-22 16:00:38 +0100 |
commit | 37267bda71d777c8eb3919085f356819ee678617 (patch) | |
tree | 8c8eed12a69abd450d2275da82895c4d0c17565b | |
parent | 3cd55264c69a9bd9955817da1801ac6e0af9842d (diff) | |
download | rabbitmq-server-37267bda71d777c8eb3919085f356819ee678617.tar.gz |
s/at-least/exactly/g
-rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 12 | ||||
-rw-r--r-- | src/rabbit_tests.erl | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index 0383a15b..203ad651 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -93,7 +93,7 @@ remove_from_queue0(QueueName, DeadGMPids) -> slave_pids = SPids1 }), %% Sometimes a slave dying means we need %% to start more on other nodes - - %% "at-least" mode can cause this to + %% "exactly" mode can cause this to %% happen. {_, OldNodes} = actual_queue_nodes(Q1), {_, NewNodes} = suggested_queue_nodes(Q1), @@ -249,7 +249,7 @@ suggested_queue_nodes(<<"nodes">>, Nodes0, {MNode, _SNodes}, _All) -> true -> {MNode, Nodes -- [MNode]}; false -> promote_slave(Nodes) end; -suggested_queue_nodes(<<"at-least">>, Count, {MNode, SNodes}, All) -> +suggested_queue_nodes(<<"exactly">>, Count, {MNode, SNodes}, All) -> SCount = Count - 1, {MNode, case SCount > length(SNodes) of true -> Cand = (All -- [MNode]) -- SNodes, @@ -267,10 +267,10 @@ actual_queue_nodes(#amqqueue{pid = MPid, slave_pids = SPids}) -> is_mirrored(Q) -> case policy(<<"ha-mode">>, Q) of - <<"all">> -> true; - <<"nodes">> -> true; - <<"at-least">> -> true; - _ -> false + <<"all">> -> true; + <<"nodes">> -> true; + <<"exactly">> -> true; + _ -> false end. update_mirrors(OldQ = #amqqueue{name = QName, pid = QPid}, diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 84d7e96a..6e185751 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -874,12 +874,12 @@ test_dynamic_mirroring() -> Test({b,[a,c]},<<"nodes">>,[<<"a">>,<<"b">>,<<"c">>],{b,[a]},[a,b,c,d]), Test({a,[b,c]},<<"nodes">>,[<<"a">>,<<"b">>,<<"c">>],{d,[a]},[a,b,c,d]), - Test({a,[b]}, <<"at-least">>,2,{a,[]}, [a,b,c,d]), - Test({a,[b,c]},<<"at-least">>,3,{a,[]}, [a,b,c,d]), - Test({a,[c]}, <<"at-least">>,2,{a,[c]}, [a,b,c,d]), - Test({a,[b,c]},<<"at-least">>,3,{a,[c]}, [a,b,c,d]), - Test({a,[c]}, <<"at-least">>,2,{a,[c,d]},[a,b,c,d]), - Test({a,[c,d]},<<"at-least">>,3,{a,[c,d]},[a,b,c,d]), + Test({a,[b]}, <<"exactly">>,2,{a,[]}, [a,b,c,d]), + Test({a,[b,c]},<<"exactly">>,3,{a,[]}, [a,b,c,d]), + Test({a,[c]}, <<"exactly">>,2,{a,[c]}, [a,b,c,d]), + Test({a,[b,c]},<<"exactly">>,3,{a,[c]}, [a,b,c,d]), + Test({a,[c]}, <<"exactly">>,2,{a,[c,d]},[a,b,c,d]), + Test({a,[c,d]},<<"exactly">>,3,{a,[c,d]},[a,b,c,d]), passed. |