diff options
author | Dan Gudmundsson <[email protected]> | 2013-08-26 16:03:37 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-08-29 10:17:31 +0200 |
commit | e92f5a220ec9d5a72ba3e65ff7715f9167e5b9b1 (patch) | |
tree | f2f0ea593f291d374d5f75446188589706c9a239 /lib/mnesia | |
parent | 2c3be1dc1a4af5028be7659587c5d5676b7eb83e (diff) | |
download | otp-e92f5a220ec9d5a72ba3e65ff7715f9167e5b9b1.tar.gz otp-e92f5a220ec9d5a72ba3e65ff7715f9167e5b9b1.tar.bz2 otp-e92f5a220ec9d5a72ba3e65ff7715f9167e5b9b1.zip |
mnesia: Checkpoint fix
Avoid hanging waiting for other processes on other node
to commit.
Diffstat (limited to 'lib/mnesia')
-rw-r--r-- | lib/mnesia/src/mnesia_checkpoint.erl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/mnesia/src/mnesia_checkpoint.erl b/lib/mnesia/src/mnesia_checkpoint.erl index 2e39defcbd..173e3be2f5 100644 --- a/lib/mnesia/src/mnesia_checkpoint.erl +++ b/lib/mnesia/src/mnesia_checkpoint.erl @@ -778,7 +778,8 @@ retainer_loop(Cp = #checkpoint_args{is_activated=false, name=Name}) -> {From, {activate, Pending}} -> StillPending = mnesia_recover:still_pending(Pending), enter_still_pending(StillPending, Cp#checkpoint_args.pending_tab), - Cp2 = maybe_activate(Cp#checkpoint_args{wait_for_old = StillPending}), + Local = [Tid || #tid{pid=Pid} = Tid <- StillPending, node(Pid) =/= node()], + Cp2 = maybe_activate(Cp#checkpoint_args{wait_for_old = Local}), reply(From, Name, activated), retainer_loop(Cp2); @@ -889,11 +890,8 @@ retainer_loop(Cp = #checkpoint_args{name=Name}) -> reply(From, Name, ok), retainer_loop(Cp#checkpoint_args{iterators = Iters}); - {_From, {exit_pending, Tid}} -> - StillPending = lists:delete(Tid, Cp#checkpoint_args.wait_for_old), - Cp2 = Cp#checkpoint_args{wait_for_old = StillPending}, - Cp3 = maybe_activate(Cp2), - retainer_loop(Cp3); + {_From, {exit_pending, _Tid}} -> + retainer_loop(Cp); {From, deactivate} -> do_stop(Cp), |