summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mnesia/src/mnesia_schema.erl19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/mnesia/src/mnesia_schema.erl b/lib/mnesia/src/mnesia_schema.erl
index c0da0674f0..f401936f85 100644
--- a/lib/mnesia/src/mnesia_schema.erl
+++ b/lib/mnesia/src/mnesia_schema.erl
@@ -3396,8 +3396,7 @@ do_merge_schema(LockTabs0) ->
RemoteRunning = mnesia_lib:intersect(New ++ Old, RemoteRunning1),
if
RemoteRunning /= RemoteRunning1 ->
- mnesia_lib:error("Mnesia on ~p could not connect to node(s) ~p~n",
- [node(), RemoteRunning1 -- RemoteRunning]),
+ warn_user_connect_failed(RemoteRunning1 -- RemoteRunning),
mnesia:abort({node_not_running, RemoteRunning1 -- RemoteRunning});
true -> ok
end,
@@ -3438,6 +3437,22 @@ do_merge_schema(LockTabs0) ->
not_merged
end.
+warn_user_connect_failed(Missing) ->
+ Tag = {user_warned, do_schema_merge},
+ case ?catch_val(Tag) of
+ {'EXIT', _} ->
+ mnesia_lib:error("Mnesia on ~p could not connect to node(s) ~p~n",
+ [node(), Missing]),
+ mnesia_lib:set(Tag, 1);
+ N when N rem 2000 =:= 0 -> %% ~10 min
+ mnesia_lib:error("Mnesia on ~p could not connect to node(s) ~p~n",
+ [node(), Missing]),
+ mnesia_lib:set(Tag, N+1);
+ N ->
+ mnesia_lib:set(Tag, N+1)
+ end.
+
+
fetch_cstructs(Node) ->
rpc:call(Node, mnesia_controller, get_remote_cstructs, []).