Skip to content

Commit

Permalink
Merge pull request #116 from qzhuyan/bugfix/william/table-schema-merg…
Browse files Browse the repository at this point in the history
…e-from-remote-node-emqx-4.3

fix: dup calls to force mnesia schema merge from remote node
  • Loading branch information
qzhuyan authored Aug 6, 2021
2 parents 76c1c20 + b8bee1c commit 8436818
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ekka.appup.src
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
%% -*-: erlang -*-

{"0.7.5",
{"0.8.1.1",
[
{"0.7.4", [
{load_module, ekka_locker, brutal_purge, soft_purge, []}
{"0.8.1", [
{load_module, ekka_mnesia, brutal_purge, soft_purge, []}
]}
],
[
{"0.7.4", [
{load_module, ekka_locker, brutal_purge, soft_purge, []}
{"0.8.1", [
{load_module, ekka_mnesia, brutal_purge, soft_purge, []}
]}
]
}.
3 changes: 3 additions & 0 deletions src/ekka_mnesia.erl
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,8 @@ do_wait_for_tables(Tables) ->
{error, Reason} -> {error, Reason};
{timeout, BadTables} ->
logger:warning("~p: still waiting for table(s): ~p", [?MODULE, BadTables]),
%% lets try to force reconnect all the db_nodes to get schema merged,
%% mnesia_controller is smart enough to not force reconnect the node that is already connected.
mnesia_controller:connect_nodes(mnesia:system_info(db_nodes)),
do_wait_for_tables(BadTables)
end.

0 comments on commit 8436818

Please sign in to comment.