summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-11-06 11:39:20 +0000
committerSimon MacMullen <simon@rabbitmq.com>2013-11-06 11:39:20 +0000
commit6f3942e31c2a23b0a29a0f819314018d5fcc09f7 (patch)
tree6f641a4ff697c85f0c2e9d96743c3cd1a95af80a
parent43a62415ae10a86c4eeb913b42e9ff8e2113a448 (diff)
downloadrabbitmq-server-6f3942e31c2a23b0a29a0f819314018d5fcc09f7.tar.gz
Maybe sync on slave promotion.
-rw-r--r--src/rabbit_mirror_queue_misc.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl
index 8ad7c62f..ca36e0db 100644
--- a/src/rabbit_mirror_queue_misc.erl
+++ b/src/rabbit_mirror_queue_misc.erl
@@ -94,10 +94,11 @@ remove_from_queue(QueueName, Self, LiveGMPids) ->
%% Either master hasn't changed, so
%% we're ok to update mnesia; or we have
%% become the master.
- store_updated_slaves(
- Q #amqqueue { pid = QPid1,
+ Q1 = Q#amqqueue{pid = QPid1,
slave_pids = SPids1,
- gm_pids = GMPids1 }),
+ gm_pids = GMPids1},
+ store_updated_slaves(Q1),
+ maybe_auto_sync(Q1),
{ok, QPid1, [QPid | SPids] -- Alive};
_ ->
%% Master has changed, and we're not it,