summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-03-05 16:01:56 +0000
committerSimon MacMullen <simon@rabbitmq.com>2013-03-05 16:01:56 +0000
commitd8be7a482b7ed4c339639f3c7404f6ef51f1c7d0 (patch)
tree2715e1eecbfa7f51df6dff92f667030b342b075f
parent46f42222a7a71714f302781d54120085202bf54f (diff)
downloadrabbitmq-server-d8be7a482b7ed4c339639f3c7404f6ef51f1c7d0.tar.gz
We don't need this - net_adm:ping/1 will not return pong for nodes that have gone down before net_ticktime expires (it will hang for until then instead).
-rw-r--r--src/rabbit_node_monitor.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl
index 08c5a25f..55b078c3 100644
--- a/src/rabbit_node_monitor.erl
+++ b/src/rabbit_node_monitor.erl
@@ -208,9 +208,10 @@ handle_call(_Request, _From, State) ->
%% mnesia information since the message can (and will) overtake the
%% mnesia propagation.
handle_cast({node_up, Node, NodeType},
- State = #state{monitors = Monitors}) ->
+ State = #state{monitors = Monitors, partitions = Partitions}) ->
+ State1 = State#state{partitions = Partitions -- [Node]},
case pmon:is_monitored({rabbit, Node}, Monitors) of
- true -> {noreply, State};
+ true -> {noreply, State1};
false -> rabbit_log:info("rabbit on node ~p up~n", [Node]),
{AllNodes, DiscNodes, RunningNodes} = read_cluster_status(),
write_cluster_status({add_node(Node, AllNodes),
@@ -220,7 +221,7 @@ handle_cast({node_up, Node, NodeType},
end,
add_node(Node, RunningNodes)}),
ok = handle_live_rabbit(Node),
- {noreply, State#state{
+ {noreply, State1#state{
monitors = pmon:monitor({rabbit, Node}, Monitors)}}
end;
handle_cast({joined_cluster, Node, NodeType}, State) ->
@@ -316,7 +317,6 @@ await_cluster_recovery() ->
end).
wait_for_cluster_recovery(Nodes) ->
- [erlang:disconnect_node(Node) || Node <- Nodes],
case majority() of
true -> rabbit:start();
false -> timer:sleep(1000),