diff options
Diffstat (limited to 'lib/mnesia/src')
-rw-r--r-- | lib/mnesia/src/mnesia_dumper.erl | 8 | ||||
-rw-r--r-- | lib/mnesia/src/mnesia_schema.erl | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/mnesia/src/mnesia_dumper.erl b/lib/mnesia/src/mnesia_dumper.erl index 644133cf5d..55b9946ae9 100644 --- a/lib/mnesia/src/mnesia_dumper.erl +++ b/lib/mnesia/src/mnesia_dumper.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 @@ -871,7 +871,11 @@ insert_op(Tid, _, {op, add_index, Pos, TabDef}, InPlace, InitBy) -> startup -> ignore; _ -> - mnesia_index:init_indecies(Tab, Storage, [Pos]) + case val({Tab,where_to_read}) of + nowhere -> ignore; + _ -> + mnesia_index:init_indecies(Tab, Storage, [Pos]) + end end; insert_op(Tid, _, {op, del_index, Pos, TabDef}, InPlace, InitBy) -> diff --git a/lib/mnesia/src/mnesia_schema.erl b/lib/mnesia/src/mnesia_schema.erl index d1d892a387..f33a6c7a84 100644 --- a/lib/mnesia/src/mnesia_schema.erl +++ b/lib/mnesia/src/mnesia_schema.erl @@ -1734,7 +1734,10 @@ prepare_op(_Tid, {op, announce_im_running, Node, SchemaDef, Running, RemoteRunni Node == node() -> %% Announce has already run on local node ignore; %% from do_merge_schema true -> - NewNodes = mnesia_lib:uniq(Running++RemoteRunning) -- val({current,db_nodes}), + %% If a node has restarted it may still linger in db_nodes, + %% but have been removed from recover_nodes + Current = mnesia_lib:intersect(val({current,db_nodes}), [node()|val(recover_nodes)]), + NewNodes = mnesia_lib:uniq(Running++RemoteRunning) -- Current, mnesia_lib:set(prepare_op, {announce_im_running,NewNodes}), announce_im_running(NewNodes, SchemaCs) end, |