diff options
| author | Tim Watson <tim@rabbitmq.com> | 2012-07-23 16:26:52 +0100 |
|---|---|---|
| committer | Tim Watson <tim@rabbitmq.com> | 2012-07-23 16:26:52 +0100 |
| commit | 3cca73829d015418366312979ac7b220e3925b74 (patch) | |
| tree | f326804c71abca7abfe06ffaeb96791cadb3806e /src | |
| parent | af469b7691e42449a30b895ab114d72c35361e71 (diff) | |
| download | rabbitmq-server-git-3cca73829d015418366312979ac7b220e3925b74.tar.gz | |
attempt to handle races between remove_from_queue and rmq_slave:init/1
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue.erl | 1 | ||||
| -rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 8b82fbae71..d82ac2660c 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -594,7 +594,6 @@ set_maximum_since_use(QPid, Age) -> on_node_down(Node) -> rabbit_misc:execute_mnesia_tx_with_tail( fun () -> QsDels = - %% BUG-24942/3: could one of these pids could be stale!? qlc:e(qlc:q([{{QName, Pid}, delete_queue(QName)} || #amqqueue{name = QName, pid = Pid, slave_pids = []} diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index 2c1885d468..31d855618e 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -62,7 +62,9 @@ remove_from_queue(QueueName, DeadPids) -> slave_pids = SPids }] -> [QPid1 | SPids1] = Alive = [Pid || Pid <- [QPid | SPids], - not lists:member(node(Pid), DeadNodes)], + not lists:member(node(Pid), + DeadNodes) orelse + rabbit_misc:is_process_alive(Pid)], case {{QPid, SPids}, {QPid1, SPids1}} of {Same, Same} -> {ok, QPid1, []}; |
