diff options
author | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-10-02 13:51:52 +0100 |
---|---|---|
committer | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-10-02 13:51:52 +0100 |
commit | 3e79a2cf23e145de7768ef1544b7e55bfa90f971 (patch) | |
tree | fc355890f95113fe209b4cf5c00f7ed2b497359b /src/rabbit_mnesia.erl | |
parent | bde9f8d0642b4b9b2cc46ce523d9fba412c98e99 (diff) | |
download | rabbitmq-server-3e79a2cf23e145de7768ef1544b7e55bfa90f971.tar.gz |
comments, also wait for tables right after you load thembug25184
Diffstat (limited to 'src/rabbit_mnesia.erl')
-rw-r--r-- | src/rabbit_mnesia.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index c0321299..87069228 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -276,6 +276,9 @@ forget_cluster_node(Node, RemoveWhenOffline) -> end. remove_node_offline_node(Node) -> + %% We want the running nodes *now*, so we don't call + %% `cluster_nodes(running)' which will just get what's in the cluster status + %% file. case {running_nodes(cluster_nodes(all)) -- [Node], node_type()} of {[], disc} -> %% Note that while we check if the nodes was the last to @@ -289,9 +292,13 @@ remove_node_offline_node(Node) -> case cluster_nodes(running) -- [node(), Node] of [] -> start_mnesia(), try + %% What we want to do here is replace the last node to + %% go down with the current node. The way we do this + %% is by force loading the table, and making sure that + %% they are loaded. rabbit_table:force_load(), - forget_cluster_node(Node, false), - rabbit_table:wait_for_replicated() + rabbit_table:wait_for_replicated(), + forget_cluster_node(Node, false) after stop_mnesia() end; |