diff options
author | Dan Gudmundsson <[email protected]> | 2017-02-01 12:12:12 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2017-02-01 12:12:12 +0100 |
commit | b54110ecf05e6403658f5ca8cfa180e287b7d90c (patch) | |
tree | 156e0f7b350cbadbf2dd3f661a3247dfd5f3ac3e /lib/mnesia/src/mnesia_checkpoint.erl | |
parent | 21d21786abdaae2ae0a601baf5102412399d7af6 (diff) | |
parent | 51faafa9a20c4afa7944b8089b26f22c774bed19 (diff) | |
download | otp-b54110ecf05e6403658f5ca8cfa180e287b7d90c.tar.gz otp-b54110ecf05e6403658f5ca8cfa180e287b7d90c.tar.bz2 otp-b54110ecf05e6403658f5ca8cfa180e287b7d90c.zip |
Merge branch 'maint-19' into maint
* maint-19:
Updated OTP version
Prepare release
Fixed crash when a table was deleted during checkpoint traversal
Diffstat (limited to 'lib/mnesia/src/mnesia_checkpoint.erl')
-rw-r--r-- | lib/mnesia/src/mnesia_checkpoint.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mnesia/src/mnesia_checkpoint.erl b/lib/mnesia/src/mnesia_checkpoint.erl index 9eb939e8d3..fc626940b4 100644 --- a/lib/mnesia/src/mnesia_checkpoint.erl +++ b/lib/mnesia/src/mnesia_checkpoint.erl @@ -909,7 +909,7 @@ retainer_loop(Cp = #checkpoint_args{name=Name}) -> retainer_loop(Cp2); {From, {iter_end, Iter}} -> - retainer_fixtable(Iter#iter.oid_tab, false), + ?SAFE(retainer_fixtable(Iter#iter.oid_tab, false)), Iters = Cp#checkpoint_args.iterators -- [Iter], reply(From, Name, ok), retainer_loop(Cp#checkpoint_args{iterators = Iters}); @@ -971,7 +971,8 @@ do_stop(Cp) -> unset({checkpoint, Name}), lists:foreach(fun deactivate_tab/1, Cp#checkpoint_args.retainers), Iters = Cp#checkpoint_args.iterators, - lists:foreach(fun(I) -> retainer_fixtable(I#iter.oid_tab, false) end, Iters). + [?SAFE(retainer_fixtable(Tab, false)) || #iter{main_tab=Tab} <- Iters], + ok. deactivate_tab(R) -> Name = R#retainer.cp_name, @@ -1151,7 +1152,7 @@ do_change_copy(Cp, Tab, FromType, ToType) -> Cp#checkpoint_args{retainers = Rs, nodes = writers(Rs)}. check_iter(From, Iter) when Iter#iter.pid == From -> - retainer_fixtable(Iter#iter.oid_tab, false), + ?SAFE(retainer_fixtable(Iter#iter.oid_tab, false)), false; check_iter(_From, _Iter) -> true. |