diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-11-21 13:36:09 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-11-21 13:36:09 +0000 |
| commit | 76761cf215e889bcde31e0c4c5ffbdb3c797a0fc (patch) | |
| tree | 859308fc6fa3439b142264329961cbf0eb5a2a9b | |
| parent | edf18aeae192c99d9c54e2b3a381795bec799f3e (diff) | |
| download | rabbitmq-server-git-76761cf215e889bcde31e0c4c5ffbdb3c797a0fc.tar.gz | |
The last changeset made it possible for Mnesia to not report a partition, so do so explicitly here.
| -rw-r--r-- | src/rabbit_node_monitor.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index 5f4530537c..f6059629f1 100644 --- a/src/rabbit_node_monitor.erl +++ b/src/rabbit_node_monitor.erl @@ -346,7 +346,7 @@ handle_cast({check_partial_partition, _Node, _Reporter, {noreply, State}; handle_cast({partial_partition, NotReallyDown, Proxy, MyGUID}, - State = #state{guid = MyGUID}) -> + State = #state{guid = MyGUID, partitions = Partitions}) -> FmtBase = "Partial partition detected:~n" " * We saw DOWN from ~s~n" " * We can still see ~s which can see ~s~n", @@ -364,7 +364,11 @@ handle_cast({partial_partition, NotReallyDown, Proxy, MyGUID}, FmtBase ++ "We will therefore intentionally disconnect from ~s~n", ArgsBase ++ [Proxy]), erlang:disconnect_node(Proxy), - {noreply, State} + %% In the event of explicitly disconnecting from a node, + %% sometimes Mnesia does not log that we were partitioned + %% - so note it here. + Partitions1 = lists:usort([Proxy | Partitions]), + {noreply, State#state{partitions = Partitions1}} end; handle_cast({partial_partition, _GUID, _Reporter, _Proxy}, State) -> |
