From 191fad4d59ba2ec340270daad994095634ac5266 Mon Sep 17 00:00:00 2001 From: ieQu1 <99872536+ieQu1@users.noreply.github.com> Date: Mon, 9 Feb 2026 19:12:49 +0100 Subject: [PATCH] fix: Force load rlog_sync before ensuring the copy --- src/mria_schema.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mria_schema.erl b/src/mria_schema.erl index 8cbe47d..d0b19bd 100644 --- a/src/mria_schema.erl +++ b/src/mria_schema.erl @@ -340,12 +340,12 @@ bootstrap() -> , config = RlogSyncOpts }, ok = create_table(RlogSyncSpec), + %% Contents of this table are irrelevant, so force load: + force_load(?rlog_sync), %% Ensure replicas are available before starting copy: %% If we've managed to sync only mnesia schema up to this point, `copy_table/2` may %% fail if other nodes suddenly become unavailable. ok = mria_mnesia:copy_table(?rlog_sync, null_copies), - %% Contents of this table are irrelevant, so force load: - force_load(?rlog_sync), %% Seed the table with the metadata: {atomic, _} = mnesia:transaction(fun mnesia:write/3, [?schema, MetaSpec, write], infinity), {atomic, _} = mnesia:transaction(fun mnesia:write/3, [?schema, RlogSyncSpec, write], infinity),