Skip to content

Commit d3208a8

Browse files
Merge pull request #9818 from rabbitmq/mergify/bp/v3.12.x/pr-9816
Handle autoheal winner_waiting state with a chosen winner to avoid crashing node monitor (backport #9816)
2 parents 89a6654 + d96df00 commit d3208a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

deps/rabbit/src/rabbit_autoheal.erl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ handle_msg({winner_is, Winner}, State = {leader_waiting, Winner, _},
263263
%% This node is the leader and a loser at the same time.
264264
Pid = restart_loser(State, Winner),
265265
{restarting, Pid};
266+
handle_msg({winner_is, Winner}, State = {winner_waiting, _OutstandingStops, _Notify},
267+
_Partitions) ->
268+
%% This node is still in winner_waiting with a winner reported, restart loser
269+
%% and update state
270+
Pid = restart_loser(State, Winner),
271+
{restarting, Pid};
266272

267273
handle_msg(Request, {restarting, Pid} = St, _Partitions) ->
268274
%% ignore, we can contribute no further

0 commit comments

Comments
 (0)