summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-06-01 11:03:02 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-06-01 11:03:02 +0100
commitb77d1dc68d86448517505583948cd166130dac65 (patch)
treecebfc6b9abae590f3b07c15444a8a122211a4df6
parentc46dc531aff9ceb0a0b213c736975d5e2fded14d (diff)
downloadrabbitmq-server-b77d1dc68d86448517505583948cd166130dac65.tar.gz
Make sure the global name server is definitely up and synced by the time we treat the cluster as "up".
-rw-r--r--src/rabbit_mnesia.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 2df76d4e..037f9687 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -92,6 +92,9 @@ init() ->
ensure_mnesia_dir(),
ok = init_db(read_cluster_nodes_config(), true,
fun maybe_upgrade_local_or_record_desired/0),
+ %% We intuitively expect the global name server to be up when
+ %% Mnesia is. In fact that's not the case - let's make it so.
+ ok = global:sync(),
ok.
is_db_empty() ->