Skip to content

Commit c186248

Browse files
Merge pull request #9816 from Ayanda-D/fix-autoheal-winner-waiting-inconsistency-crash
Handle autoheal winner_waiting state with a chosen winner to avoid crashing node monitor
2 parents f6af5e6 + ecf3549 commit c186248

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)