summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 633af6cb72..7175d05940 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 c5f83c24dc..55d61d4120 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}