summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-06-21 16:51:22 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-06-21 16:51:22 +0100
commita8117713d9b4333c994016d04efe4ce6ef020643 (patch)
treeab7b0141ac0ff060920626bf8a17edbada2d824d
parent6db76bf64b8a941f5ac7bb76f042e38088d7404a (diff)
downloadrabbitmq-server-a8117713d9b4333c994016d04efe4ce6ef020643.tar.gz
All done.
-rw-r--r--src/rabbit_mirror_queue_misc.erl5
-rw-r--r--src/rabbit_mirror_queue_slave.erl8
2 files changed, 9 insertions, 4 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl
index 633af6cb..7175d059 100644
--- a/src/rabbit_mirror_queue_misc.erl
+++ b/src/rabbit_mirror_queue_misc.erl
@@ -69,6 +69,11 @@ on_node_up() ->
mnesia:foldl(
fun (#amqqueue { mirror_nodes = [] }, QsN) ->
QsN;
+ (#amqqueue { mirror_nodes = undefined }, QsN) ->
+ QsN;
+ (#amqqueue { name = QName,
+ mirror_nodes = all }, QsN) ->
+ [QName | QsN];
(#amqqueue { name = QName,
mirror_nodes = MNodes }, QsN) ->
case lists:member(node(), MNodes) of
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index c5f83c24..55d61d41 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -84,13 +84,13 @@ init([#amqqueue { name = QueueName } = Q]) ->
{ok, MPid} =
rabbit_misc:execute_mnesia_transaction(
fun () ->
- [Q1 = #amqqueue { pid = QPid, mirror_pids = MPids }] =
+ [Q1 = #amqqueue { pid = QPid, slave_pids = MPids }] =
mnesia:read({rabbit_queue, QueueName}),
%% ASSERTION
[] = [Pid || Pid <- [QPid | MPids], node(Pid) =:= Node],
MPids1 = MPids ++ [Self],
mnesia:write(rabbit_queue,
- Q1 #amqqueue { mirror_pids = MPids1 },
+ Q1 #amqqueue { slave_pids = MPids1 },
write),
{ok, QPid}
end),
@@ -714,7 +714,7 @@ process_instruction(
end;
{{value, {#delivery {}, _EnqueueOnPromotion}}, _MQ2} ->
%% The instruction was sent to us before we were
- %% within the mirror_pids within the #amqqueue{}
+ %% within the slave_pids within the #amqqueue{}
%% record. We'll never receive the message directly
%% from the channel. And the channel will not be
%% expecting any confirms from us.
@@ -756,7 +756,7 @@ process_instruction({discard, ChPid, Msg = #basic_message { id = MsgId }},
{MQ2, PendingCh, MS};
{{value, {#delivery {}, _EnqueueOnPromotion}}, _MQ2} ->
%% The instruction was sent to us before we were
- %% within the mirror_pids within the #amqqueue{}
+ %% within the slave_pids within the #amqqueue{}
%% record. We'll never receive the message directly
%% from the channel.
{MQ, PendingCh, MS}