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 | 798732aa0eed105bcc93161c36ac5fc1503d4d6e (patch) | |
| tree | 3eea6d6894bc0cd6c43df2f7f4ae8940fba980dc /src | |
| parent | e8aa4bf019e36c11b0b047484020e2a34cd10130 (diff) | |
| download | rabbitmq-server-git-798732aa0eed105bcc93161c36ac5fc1503d4d6e.tar.gz | |
always return DeadPids, so that all deaths are logged
Diffstat (limited to 'src')
| -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 1288479054..56d15a7966 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 |
