summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2019-04-03 11:46:31 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2019-04-03 11:50:37 +0200
commit09ab089066e8148ebe30ce3183958ea039470826 (patch)
treeeb845389559cdee06d5688198c0204e5486f7e0f
parent662630216b1d77ed6cd50b16a8c2608cbe6a1152 (diff)
downloadrabbitmq-server-git-09ab089066e8148ebe30ce3183958ea039470826.tar.gz
Retry Mnesia tables wait in the `quorum_queue` feature flag migration
Before this patch, the migration function waited once 30 seconds then gave up. This was inconsistent with what the boot process does: wait for 30 seconds, 10 times in a row. Now, we do the same thing in the `quorum_queue` migration function, so that it gives up at the same time as the boot process.
-rw-r--r--src/rabbit_core_ff.erl4
-rw-r--r--src/rabbit_table.erl2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_core_ff.erl b/src/rabbit_core_ff.erl
index 461a43e5d9..24d2163f16 100644
--- a/src/rabbit_core_ff.erl
+++ b/src/rabbit_core_ff.erl
@@ -44,12 +44,12 @@
quorum_queue_migration(FeatureName, _FeatureProps, enable) ->
Tables = ?quorum_queue_tables,
- rabbit_table:wait(Tables),
+ rabbit_table:wait(Tables, _Retry = true),
Fields = amqqueue:fields(amqqueue_v2),
migrate_to_amqqueue_with_type(FeatureName, Tables, Fields);
quorum_queue_migration(_FeatureName, _FeatureProps, is_enabled) ->
Tables = ?quorum_queue_tables,
- rabbit_table:wait(Tables),
+ rabbit_table:wait(Tables, _Retry = true),
Fields = amqqueue:fields(amqqueue_v2),
mnesia:table_info(rabbit_queue, attributes) =:= Fields andalso
mnesia:table_info(rabbit_durable_queue, attributes) =:= Fields.
diff --git a/src/rabbit_table.erl b/src/rabbit_table.erl
index 60e9c9dac2..7dfc5fb573 100644
--- a/src/rabbit_table.erl
+++ b/src/rabbit_table.erl
@@ -16,7 +16,7 @@
-module(rabbit_table).
--export([create/0, create_local_copy/1, wait_for_replicated/1, wait/1,
+-export([create/0, create_local_copy/1, wait_for_replicated/1, wait/1, wait/2,
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,
wait_for_replicated/0]).