diff options
author | Dan Gudmundsson <[email protected]> | 2011-02-15 16:38:31 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-03-09 11:37:16 +0100 |
commit | 4ae2082e0c3bd963a6c4bbfdae033bc85e6ff78d (patch) | |
tree | 4232b819d789f0ca8c5d540d34bf7f7317de05bf /lib/mnesia/src | |
parent | 97cfa44354f188240c0a9fdfb55c076348ee77af (diff) | |
download | otp-4ae2082e0c3bd963a6c4bbfdae033bc85e6ff78d.tar.gz otp-4ae2082e0c3bd963a6c4bbfdae033bc85e6ff78d.tar.bz2 otp-4ae2082e0c3bd963a6c4bbfdae033bc85e6ff78d.zip |
Abort/restart if network has changed, can be a partioned network
Diffstat (limited to 'lib/mnesia/src')
-rw-r--r-- | lib/mnesia/src/mnesia_schema.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/mnesia/src/mnesia_schema.erl b/lib/mnesia/src/mnesia_schema.erl index 17e570b881..d1d892a387 100644 --- a/lib/mnesia/src/mnesia_schema.erl +++ b/lib/mnesia/src/mnesia_schema.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -2686,7 +2686,8 @@ do_merge_schema(LockTabs0) -> if RemoteRunning /= RemoteRunning1 -> mnesia_lib:error("Mnesia on ~p could not connect to node(s) ~p~n", - [node(), RemoteRunning1 -- RemoteRunning]); + [node(), RemoteRunning1 -- RemoteRunning]), + mnesia:abort({node_not_running, RemoteRunning1 -- RemoteRunning}); true -> ok end, NeedsLock = RemoteRunning -- LockedAlready, @@ -3029,7 +3030,9 @@ announce_im_running([N | Ns], SchemaCs) -> mnesia_lib:add({current, db_nodes}, N), mnesia_controller:add_active_replica(schema, N, SchemaCs); false -> - ignore + mnesia_lib:error("Mnesia on ~p could not connect to node ~p~n", + [node(), N]), + mnesia:abort({node_not_running, N}) end, announce_im_running(Ns, SchemaCs); announce_im_running([], _) -> |