diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2017-01-06 22:23:20 +0800 |
|---|---|---|
| committer | Michael Klishin <mklishin@pivotal.io> | 2017-01-06 22:23:20 +0800 |
| commit | 1bfce82fd9fc8c1216f6b74f81d61e70237a3f28 (patch) | |
| tree | 0a75334e8a0554827be4ef01b9ad22349e1bded5 | |
| parent | fa16519406b88ed56e44f30f392bdb7ef328d9c7 (diff) | |
| download | rabbitmq-server-git-1bfce82fd9fc8c1216f6b74f81d61e70237a3f28.tar.gz | |
Re-introduce rabbit_table:wait_for_replicated/0 for backwards compatibility
Fixes rabbitmq/rabbitmq-clusterer#19.
| -rw-r--r-- | src/rabbit_table.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rabbit_table.erl b/src/rabbit_table.erl index 43a744d315..4a9a02e492 100644 --- a/src/rabbit_table.erl +++ b/src/rabbit_table.erl @@ -18,7 +18,8 @@ -export([create/0, create_local_copy/1, wait_for_replicated/1, wait/1, force_load/0, is_present/0, is_empty/0, needs_default_data/0, - check_schema_integrity/1, clear_ram_only_tables/0, retry_timeout/0]). + check_schema_integrity/1, clear_ram_only_tables/0, retry_timeout/0, + wait_for_replicated/0]). -include("rabbit.hrl"). @@ -28,6 +29,7 @@ -spec create() -> 'ok'. -spec create_local_copy('disc' | 'ram') -> 'ok'. -spec wait_for_replicated(retry()) -> 'ok'. +-spec wait_for_replicated() -> 'ok'. -spec wait([atom()]) -> 'ok'. -spec retry_timeout() -> {non_neg_integer() | infinity, non_neg_integer()}. -spec force_load() -> 'ok'. @@ -64,6 +66,11 @@ create_local_copy(ram) -> create_local_copies(ram), create_local_copy(schema, ram_copies). +%% This arity only exists for backwards compatibility with certain +%% plugins. See https://github.com/rabbitmq/rabbitmq-clusterer/issues/19. +wait_for_replicated() -> + wait_for_replicated(false). + wait_for_replicated(Retry) -> wait([Tab || {Tab, TabDef} <- definitions(), not lists:member({local_content, true}, TabDef)], Retry). |
