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 | 0e2442db25cc4d4aae6df6e440315ef583320a11 (patch) | |
| tree | 8c8eed12a69abd450d2275da82895c4d0c17565b | |
| parent | afe1bd670c95a633e7bb4c7ac938bafdcad9e43c (diff) | |
| download | rabbitmq-server-git-0e2442db25cc4d4aae6df6e440315ef583320a11.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 0383a15bc2..203ad651e9 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 84d7e96aa1..6e18575162 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. |
