{consistent_hash,recent_history}_exchange plugins: add retries to schema sync

So, do what RabbitMQ core does as of 3.6.7 or so.

This makes it possible for nodes with those plugins enabled to be
restarted in arbitrary order within a certain time window, just
like nodes without those plugins.
This commit is contained in:
Michael Klishin 2021-05-26 20:49:14 +03:00
parent b498ed5030
commit 7f0d9fa1e7
No known key found for this signature in database
GPG Key ID: E80EDCFA0CDB21EE
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ init() ->
{attributes, record_info(fields, chx_hash_ring)},
{type, ordered_set}]),
mnesia:add_table_copy(?HASH_RING_STATE_TABLE, node(), ram_copies),
mnesia:wait_for_tables([?HASH_RING_STATE_TABLE], 30000),
rabbit_table:wait([?HASH_RING_STATE_TABLE]),
recover(),
ok.

View File

@ -127,7 +127,7 @@ setup_schema() ->
{record_name, cached},
{type, set}]),
mnesia:add_table_copy(?RH_TABLE, node(), ram_copies),
mnesia:wait_for_tables([?RH_TABLE], 30000),
rabbit_table:wait([?RH_TABLE]),
ok.
disable_plugin() ->