summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-07-13 11:06:05 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-07-13 11:06:05 +0100
commit99927387382064f92603c3255f9ab5c9f8de10f8 (patch)
treef651eceacd90563af734e15d4001927b79ec5b89
parent7b68ff61c81e3fa488bb8c3a300d3238ef4e5de3 (diff)
downloadrabbitmq-server-99927387382064f92603c3255f9ab5c9f8de10f8.tar.gz
Explain this message.
-rw-r--r--src/rabbit_mirror_queue_slave.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index c96e98b6..2d7bd9a1 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -199,6 +199,11 @@ handle_call({gm_deaths, Deaths}, From,
%% master has changed to not us.
gen_server2:reply(From, ok),
erlang:monitor(process, Pid),
+ %% GM is lazy. So we know of the death of the
+ %% slave since it is a neighbour of ours, but
+ %% until a message is sent, not all members will
+ %% know. That might include the new master. So
+ %% broadcast a no-op message to wake everyone up.
ok = gm:broadcast(GM, master_changed),
noreply(State #state { master_pid = Pid })
end