Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
1084-mnesia-Don-t-spam-error-when-in-partitione...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1084-mnesia-Don-t-spam-error-when-in-partitioned-networks.patch of Package erlang
From 5e0e583dd7e412f11c173bef0899ee7ca9a6f08c Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson <dgud@erlang.org> Date: Thu, 20 Oct 2022 13:33:25 +0200 Subject: [PATCH] mnesia: Don't spam error when in partitioned networks Do printout every ~10 min. --- lib/mnesia/src/mnesia_schema.erl | 19 +++++++++++++++++-- 1 file 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, []). -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor