summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-03-09 13:07:07 +0100
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-03-10 12:10:13 +0100
commit2e5e31494938dea19b2827c5252f7ac2ce9c2d8b (patch)
treec994edf3ad85585488fb0399c67d9c5efc574a76 /src
parent7b38a63dac57326ae2835c2af463245ff43a333b (diff)
downloadrabbitmq-server-git-2e5e31494938dea19b2827c5252f7ac2ce9c2d8b.tar.gz
rabbit_node_monitor: Exclude Mnesia-synced nodes when clearing partitions
Otherwise, in handle_dead_rabbit(), if the specified node is already back in the cluster, "partitions" will not be emptied.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_node_monitor.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl
index 785b3b5243..8de6b64511 100644
--- a/src/rabbit_node_monitor.erl
+++ b/src/rabbit_node_monitor.erl
@@ -732,7 +732,9 @@ handle_dead_rabbit(Node, State = #state{partitions = Partitions,
%% that we do not attempt to deal with individual (other) partitions
%% going away. It's only safe to forget anything about partitions when
%% there are no partitions.
- Partitions1 = case Partitions -- (Partitions -- alive_rabbit_nodes()) of
+ NotRunningRabbit = Partitions -- alive_rabbit_nodes(),
+ InSync = rabbit_mnesia:cluster_nodes(running),
+ Partitions1 = case Partitions -- NotRunningRabbit -- InSync of
[] -> [];
_ -> Partitions
end,