Skip to content

Commit ca8dee1

Browse files
committed
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.
1 parent a273ab0 commit ca8dee1

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/rabbit_mirror_queue_slave.erl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ handle_call({gm_deaths, DeadGMPids}, From,
233233
gen_server2:reply(From, ok),
234234
{stop, normal, State};
235235
{error, {not_synced, SPids}} ->
236-
WaitTimeout = rabbit_misc:get_env(rabbit, slave_wait_timeout, 15000),
237-
rabbit_mirror_queue_misc:stop_all_slaves(
238-
{error, not_synced}, SPids, QName, GM, WaitTimeout),
239236
BQ:delete_and_terminate({error, not_synced}, BQS),
240237
{stop, normal, State#state{backing_queue_state = undefined}};
241238
{ok, Pid, DeadPids, ExtraNodes} ->

0 commit comments

Comments
 (0)