diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2013-03-12 17:55:05 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2013-03-12 17:55:05 +0000 |
| commit | 105da1d64c8faf57930e448a42958901db55908f (patch) | |
| tree | 2e54011d7b5001d5e166e8b528cf35920f861947 | |
| parent | 410e42ce463c15e1a24330eff92e1688f6d73f53 (diff) | |
| download | rabbitmq-server-git-105da1d64c8faf57930e448a42958901db55908f.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.
| -rw-r--r-- | src/rabbit_node_monitor.erl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index 98e26a6a6d..3d900d2690 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}. |
