diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2012-06-19 12:25:32 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2012-06-19 12:25:32 +0100 |
| commit | dd3b408045304969b0cbce6ccdc27284c6de2ca1 (patch) | |
| tree | 4ee5f3db72ca0446a46f227c4a85774828181591 /src | |
| parent | 1e4ad9572eadbe644913f34ebc57f5dedcde3fb4 (diff) | |
| parent | ae303c32ffe9980460fa4b1838475e077e79aead (diff) | |
| download | rabbitmq-server-git-dd3b408045304969b0cbce6ccdc27284c6de2ca1.tar.gz | |
Merge bug24994
Diffstat (limited to 'src')
| -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 c1673504e7..eca1017cfc 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -166,6 +166,9 @@ [queue_name, channel_pid, consumer_tag, ack_required]). start() -> + %% Clear out remnants of old incarnation, in case we restarted + %% faster than other nodes handled DOWN messages from us. + on_node_down(node()), DurableQueues = find_durable_queues(), {ok, BQ} = application:get_env(rabbit, backing_queue_module), ok = BQ:start([QName || #amqqueue{name = QName} <- DurableQueues]), @@ -573,7 +576,8 @@ on_node_down(Node) -> #amqqueue{name = QName, pid = Pid, slave_pids = []} <- mnesia:table(rabbit_queue), - node(Pid) == Node])), + node(Pid) == Node andalso + not is_process_alive(Pid)])), {Qs, Dels} = lists:unzip(QsDels), T = rabbit_binding:process_deletions( lists:foldl(fun rabbit_binding:combine_deletions/2, |
