Skip to content

Commit d539f6d

Browse files
authored
Merge pull request #201 from emqx/dev/force-load-rlog_sync-table-followup
Fix waiting order for rlog_sync table
2 parents 493285a + 191fad4 commit d539f6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mria_schema.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,12 @@ bootstrap() ->
340340
, config = RlogSyncOpts
341341
},
342342
ok = create_table(RlogSyncSpec),
343+
%% Contents of this table are irrelevant, so force load:
344+
force_load(?rlog_sync),
343345
%% Ensure replicas are available before starting copy:
344346
%% If we've managed to sync only mnesia schema up to this point, `copy_table/2` may
345347
%% fail if other nodes suddenly become unavailable.
346348
ok = mria_mnesia:copy_table(?rlog_sync, null_copies),
347-
%% Contents of this table are irrelevant, so force load:
348-
force_load(?rlog_sync),
349349
%% Seed the table with the metadata:
350350
{atomic, _} = mnesia:transaction(fun mnesia:write/3, [?schema, MetaSpec, write], infinity),
351351
{atomic, _} = mnesia:transaction(fun mnesia:write/3, [?schema, RlogSyncSpec, write], infinity),

0 commit comments

Comments
 (0)