diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-11-06 11:39:20 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-11-06 11:39:20 +0000 |
commit | 6f3942e31c2a23b0a29a0f819314018d5fcc09f7 (patch) | |
tree | 6f641a4ff697c85f0c2e9d96743c3cd1a95af80a | |
parent | 43a62415ae10a86c4eeb913b42e9ff8e2113a448 (diff) | |
download | rabbitmq-server-6f3942e31c2a23b0a29a0f819314018d5fcc09f7.tar.gz |
Maybe sync on slave promotion.
-rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 7 |
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, |