diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-06-20 14:48:31 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-06-20 14:48:31 +0100 |
commit | 92edfb501c0bd34f58e6ce9a8a4f7c9d13ddacd7 (patch) | |
tree | d27646132ec0a94674ae8c323d96b42786766d61 | |
parent | 2a1a5da1bc937b537f356c5b67866679a84d2652 (diff) | |
download | rabbitmq-server-92edfb501c0bd34f58e6ce9a8a4f7c9d13ddacd7.tar.gz |
Do not "recover" queues if there is already a rabbit_queue record for them. If we are restarting quickly it could be the case that we have a slave alive that has not failed over yet. Don't usurp it.
-rw-r--r-- | src/rabbit_amqqueue.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index e0fbaf77..84b6f35a 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -219,8 +219,12 @@ find_durable_queues() -> %% TODO: use dirty ops instead rabbit_misc:execute_mnesia_transaction( fun () -> - qlc:e(qlc:q([Q || Q = #amqqueue{pid = Pid} + qlc:e(qlc:q([Q || Q = #amqqueue{name = Name, + pid = Pid} <- mnesia:table(rabbit_durable_queue), + #amqqueue{name = Name2} + <- mnesia:table(rabbit_queue), + Name =:= Name2, node(Pid) == Node])) end). |