summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-03-12 17:55:05 +0000
committerSimon MacMullen <simon@rabbitmq.com>2013-03-12 17:55:05 +0000
commit5dea4c63b56e8b9a7acdf0cedbe5fa051ea5e266 (patch)
tree2e54011d7b5001d5e166e8b528cf35920f861947
parent62d12b03e9abe95c60bb00e7faafb6849dc21f9f (diff)
downloadrabbitmq-server-bug25486.tar.gz
Treat {inconsistent_database, running_partitioned_network, Node} as being sort of like {node_up, Node, NodeType}. It's not perfect, but it's the best we're going to get.bug25486
-rw-r--r--src/rabbit_node_monitor.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl
index 98e26a6a..3d900d26 100644
--- a/src/rabbit_node_monitor.erl
+++ b/src/rabbit_node_monitor.erl
@@ -257,10 +257,19 @@ handle_info({'DOWN', _MRef, process, Pid, _Reason},
handle_info({mnesia_system_event,
{inconsistent_database, running_partitioned_network, Node}},
- State = #state{partitions = Partitions}) ->
+ State = #state{partitions = Partitions,
+ monitors = Monitors}) ->
+ %% We will not get a node_up from this node - yet we should treat it as
+ %% up (mostly).
+ State1 = case pmon:is_monitored({rabbit, Node}, Monitors) of
+ true -> State;
+ false -> State#state{
+ monitors = pmon:monitor({rabbit, Node}, Monitors)}
+ end,
+ ok = handle_live_rabbit(Node),
Partitions1 = ordsets:to_list(
ordsets:add_element(Node, ordsets:from_list(Partitions))),
- {noreply, State#state{partitions = Partitions1}};
+ {noreply, State1#state{partitions = Partitions1}};
handle_info(_Info, State) ->
{noreply, State}.