aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-04-19 12:12:52 +0200
committerDan Gudmundsson <[email protected]>2011-05-12 10:10:32 +0200
commitafd3afeecb987de76bba24558a5c30b0ee4bdd2c (patch)
tree021a61a4349b9bcda77768d9a9383fb8e3fa1e7e /lib/mnesia
parent5703c55ea47c52a8dc8475085a8657422da3535e (diff)
downloadotp-afd3afeecb987de76bba24558a5c30b0ee4bdd2c.tar.gz
otp-afd3afeecb987de76bba24558a5c30b0ee4bdd2c.tar.bz2
otp-afd3afeecb987de76bba24558a5c30b0ee4bdd2c.zip
Use recover_nodes when deciding alive nodes
Fixes timing issue in test cases
Diffstat (limited to 'lib/mnesia')
-rw-r--r--lib/mnesia/src/mnesia_schema.erl5
1 files changed, 4 insertions, 1 deletions
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,