diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2011-06-21 16:51:22 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-06-21 16:51:22 +0100 |
| commit | 1d2d2d6c00cf87fd9105cb5f0dd8f2f2c527ce9e (patch) | |
| tree | ab7b0141ac0ff060920626bf8a17edbada2d824d /src | |
| parent | 42a3391e1be4e3ca4b914d40fb77a4f45d79cb04 (diff) | |
| download | rabbitmq-server-git-1d2d2d6c00cf87fd9105cb5f0dd8f2f2c527ce9e.tar.gz | |
All done.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 5 | ||||
| -rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 8 |
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} |
