Skip to content

Commit 998e1a1

Browse files
committed
Handle missing guids on startup
When two or more nodes start at the same time, we have to use the list of running mnesia nodes instead of the fully running rabbit nodes. When a node is in the node_monitor's init stage, it isn't counted as a fully running rabbit node. This means that its GUID isn't sent to the other node starting up. This race condition means that the node_monitor will not do anything with a node_down event, because the down node will be missing from the GUID map.
1 parent 75d7609 commit 998e1a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/src/rabbit_node_monitor.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ handle_call(_Request, _From, State) ->
413413
{noreply, State}.
414414

415415
handle_cast(notify_node_up, State = #state{guid = GUID}) ->
416-
Nodes = rabbit_nodes:list_running() -- [node()],
416+
Nodes = rabbit_nodes:list_reachable() -- [node()],
417417
gen_server:abcast(Nodes, ?SERVER,
418418
{node_up, node(), rabbit_db_cluster:node_type(), GUID}),
419419
%% register other active rabbits with this rabbit

0 commit comments

Comments
 (0)