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 | 9fcbb9b80dffb6ea979e16563e1a8ea56232ab45 (patch) | |
| tree | d27646132ec0a94674ae8c323d96b42786766d61 | |
| parent | 97f271b98959bddb9d30761b31c694df15a1ecf5 (diff) | |
| download | rabbitmq-server-git-9fcbb9b80dffb6ea979e16563e1a8ea56232ab45.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 e0fbaf77df..84b6f35a88 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). |
