summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Fedotov <hairyhum@gmail.com>2018-04-27 10:12:17 +0100
committerDaniil Fedotov <hairyhum@gmail.com>2018-04-27 10:59:13 +0100
commitca8dee1ec41083f6abfe59b92a707221f5f65ed8 (patch)
tree8d23b1fc51d5dca79d6b37eef9a456f943796559
parenta273ab0107ddf630ef8fe7c9af7056a1bc913277 (diff)
downloadrabbitmq-server-git-ca8dee1ec41083f6abfe59b92a707221f5f65ed8.tar.gz
Do not try to stop all slaves from slave process. Stop it and let another be promoted
There can be a race condition when a master queue is briefly restarted. If master rejoins a stopping GM it is also stopped. In that case it sould be sefier to stop the slave and let another be promoted and also stopped. If master return it will either rejoin slaves or create a new GM.
-rw-r--r--src/rabbit_mirror_queue_slave.erl3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index ee8c7f9d26..f1f48dd871 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -233,9 +233,6 @@ handle_call({gm_deaths, DeadGMPids}, From,
gen_server2:reply(From, ok),
{stop, normal, State};
{error, {not_synced, SPids}} ->
- WaitTimeout = rabbit_misc:get_env(rabbit, slave_wait_timeout, 15000),
- rabbit_mirror_queue_misc:stop_all_slaves(
- {error, not_synced}, SPids, QName, GM, WaitTimeout),
BQ:delete_and_terminate({error, not_synced}, BQS),
{stop, normal, State#state{backing_queue_state = undefined}};
{ok, Pid, DeadPids, ExtraNodes} ->