Merge pull request #11158 from lafirest/fix/wait_table_in_retainer

fix(emqx_retainer): wait for Mria tables
This commit is contained in:
lafirest 2023-06-29 16:01:54 +08:00 committed by GitHub
commit be1a4c89a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -127,6 +127,7 @@ create_table(Table, RecordName, Attributes, Type, StorageType) ->
{storage_properties, StoreProps}
]),
ok = mria_rlog:wait_for_shards([?RETAINER_SHARD], infinity),
ok = mria:wait_for_tables([Table]),
case mnesia:table_info(Table, storage_type) of
Copies ->
ok;

View File

@ -0,0 +1 @@
Wait for Mria table when the mnesia backend of retainer starts to avoid a possible error of the retainer when joining a cluster.