diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2014-04-16 17:36:36 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2014-04-16 17:36:36 +0100 |
commit | 675b478fd091ba29dbafe7f1e3f2aae0b50fe520 (patch) | |
tree | 3eea6d6894bc0cd6c43df2f7f4ae8940fba980dc | |
parent | 38a9e8e81e11c70391f7c5de5e22cddfd978ae06 (diff) | |
download | rabbitmq-server-675b478fd091ba29dbafe7f1e3f2aae0b50fe520.tar.gz |
always return DeadPids, so that all deaths are logged
-rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index 12884790..56d15a79 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -94,7 +94,7 @@ remove_from_queue(QueueName, Self, DeadGMPids) -> {QPid1, SPids1} = promote_slave(Alive), case {{QPid, SPids}, {QPid1, SPids1}} of {Same, Same} -> - {ok, QPid1, []}; + ok; _ when QPid =:= QPid1 orelse QPid1 =:= Self -> %% Either master hasn't changed, so %% we're ok to update mnesia; or we have @@ -107,16 +107,15 @@ remove_from_queue(QueueName, Self, DeadGMPids) -> %% might tell the old master we need to sync and %% then shut it down. So let's check if the new %% master needs to sync. - maybe_auto_sync(Q1), - {ok, QPid1, DeadPids}; + maybe_auto_sync(Q1); _ -> %% Master has changed, and we're not it. %% [1]. Q1 = Q#amqqueue{slave_pids = Alive, gm_pids = AliveGM}, - store_updated_slaves(Q1), - {ok, QPid1, []} - end + store_updated_slaves(Q1) + end, + {ok, QPid1, DeadPids} end end). %% [1] We still update mnesia here in case the slave that is supposed |