Skip to content

Commit 7f0d9fa

Browse files
{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.
1 parent b498ed5 commit 7f0d9fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

deps/rabbitmq_consistent_hash_exchange/src/rabbit_exchange_type_consistent_hash.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ init() ->
5353
{attributes, record_info(fields, chx_hash_ring)},
5454
{type, ordered_set}]),
5555
mnesia:add_table_copy(?HASH_RING_STATE_TABLE, node(), ram_copies),
56-
mnesia:wait_for_tables([?HASH_RING_STATE_TABLE], 30000),
56+
rabbit_table:wait([?HASH_RING_STATE_TABLE]),
5757
recover(),
5858
ok.
5959

deps/rabbitmq_recent_history_exchange/src/rabbit_exchange_type_recent_history.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ setup_schema() ->
127127
{record_name, cached},
128128
{type, set}]),
129129
mnesia:add_table_copy(?RH_TABLE, node(), ram_copies),
130-
mnesia:wait_for_tables([?RH_TABLE], 30000),
130+
rabbit_table:wait([?RH_TABLE]),
131131
ok.
132132

133133
disable_plugin() ->

0 commit comments

Comments
 (0)