aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-04-24 11:54:20 +0200
committerDan Gudmundsson <[email protected]>2014-04-24 11:54:20 +0200
commit720f33780dfac4f5ec0889d5fcfb1428ec157482 (patch)
tree748b872eab71066146f119053687fad9c4f6b8f4 /lib
parent450f0f893b5d28e6d967b163111f8a8a6032b0e1 (diff)
downloadotp-720f33780dfac4f5ec0889d5fcfb1428ec157482.tar.gz
otp-720f33780dfac4f5ec0889d5fcfb1428ec157482.tar.bz2
otp-720f33780dfac4f5ec0889d5fcfb1428ec157482.zip
mnesia: Handle failed net_loads better
In case of a failed net load and no more available copies, remove the table from late_load_queue, otherwise tables can not be forced loaded.
Diffstat (limited to 'lib')
-rw-r--r--lib/mnesia/src/mnesia_controller.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl
index 78f7bfa325..bc361d624c 100644
--- a/lib/mnesia/src/mnesia_controller.erl
+++ b/lib/mnesia/src/mnesia_controller.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -1206,7 +1206,14 @@ handle_info(Done = #loader_done{worker_pid=WPid, table_name=Tab}, State0) ->
{value,{_,Worker}} = lists:keysearch(WPid,1,get_loaders(State0)),
add_loader(Tab,Worker,State1);
_ ->
- State1
+ DelState = State1#state{late_loader_queue=gb_trees:delete_any(Tab, LateQueue0)},
+ case ?catch_val({Tab, storage_type}) of
+ ram_copies ->
+ cast({disc_load, Tab, ram_only}),
+ DelState;
+ _ ->
+ DelState
+ end
end
end,
State3 = opt_start_worker(State2),