diff options
| author | Rob Harrop <rob@rabbitmq.com> | 2011-02-23 14:43:00 +0000 |
|---|---|---|
| committer | Rob Harrop <rob@rabbitmq.com> | 2011-02-23 14:43:00 +0000 |
| commit | 78980b58f37d81f8cebabcb465c41c439f74ec16 (patch) | |
| tree | b3c3c600c0d01c10215bed5aa7486fd302c03b91 | |
| parent | 83a876c7facf3b66c6c9bcf65293f4375183215d (diff) | |
| download | rabbitmq-server-git-78980b58f37d81f8cebabcb465c41c439f74ec16.tar.gz | |
Removed table name intersection in wait_for_tables and cleaned up whitespace changes
| -rw-r--r-- | src/rabbit_mnesia.erl | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index 93e203812c..f2d23dad6d 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -388,8 +388,7 @@ init_db(ClusterNodes, Force) -> {[], true, [_]} -> %% True single disc node, attempt upgrade case rabbit_upgrade:maybe_upgrade() of - ok -> ok = wait_for_tables(), - ensure_schema_integrity(); + ok -> ensure_schema_integrity(); version_not_available -> schema_ok_or_move() end; {[], true, _} -> @@ -544,17 +543,15 @@ create_local_table_copy(Tab, Type) -> end, ok. -wait_for_replicated_tables() -> - wait_for_tables(replicated_table_names()). +wait_for_replicated_tables() -> wait_for_tables(replicated_table_names()). -wait_for_tables() -> - wait_for_tables(table_names()). +wait_for_tables() -> wait_for_tables(table_names()). wait_for_tables(TableNames) -> - Nonexistent = TableNames -- mnesia:system_info(tables), - case mnesia:wait_for_tables(TableNames -- Nonexistent, 30000) of - ok -> ok; - {timeout, BadTabs} -> + case mnesia:wait_for_tables(TableNames, 30000) of + ok -> + ok; + {timeout, BadTabs} -> throw({error, {timeout_waiting_for_tables, BadTabs}}); {error, Reason} -> throw({error, {failed_waiting_for_tables, Reason}}) |
