aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2010-02-04 13:40:03 +0000
committerErlang/OTP <[email protected]>2010-02-04 13:40:03 +0000
commit2a0a4a206d101e1b6f2d73bc3c0b59cccca3dee5 (patch)
treeb1263a3a9c20a85c3a8e91e2cf7a8434d148fa00 /lib/mnesia
parent3d02efe3bbcfc24e7a96b90b60d0a4d9911242fc (diff)
downloadotp-2a0a4a206d101e1b6f2d73bc3c0b59cccca3dee5.tar.gz
otp-2a0a4a206d101e1b6f2d73bc3c0b59cccca3dee5.tar.bz2
otp-2a0a4a206d101e1b6f2d73bc3c0b59cccca3dee5.zip
OTP-8402 Transactions could be left hanging if a node went down when
invoking mnesia:sync_transaction/[1,2]. Thanks Igor Ribeiro Sucupira.
Diffstat (limited to 'lib/mnesia')
-rw-r--r--lib/mnesia/src/mnesia_monitor.erl2
-rw-r--r--lib/mnesia/src/mnesia_tm.erl11
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/mnesia/src/mnesia_monitor.erl b/lib/mnesia/src/mnesia_monitor.erl
index ab1500d439..5df5df4969 100644
--- a/lib/mnesia/src/mnesia_monitor.erl
+++ b/lib/mnesia/src/mnesia_monitor.erl
@@ -497,7 +497,7 @@ handle_cast({mnesia_down, mnesia_locker, Node}, State) ->
process_q(State3);
false ->
%% No pending remote monitors
- {noreply, State2}
+ process_q(State2)
end;
handle_cast({disconnect, Node}, State) ->
diff --git a/lib/mnesia/src/mnesia_tm.erl b/lib/mnesia/src/mnesia_tm.erl
index 3f3a10a9c1..d42109c3da 100644
--- a/lib/mnesia/src/mnesia_tm.erl
+++ b/lib/mnesia/src/mnesia_tm.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -1389,6 +1389,7 @@ multi_commit(sync_sym_trans, Tid, CR, Store) ->
{Outcome, []} = rec_all(WaitFor, Tid, do_commit, []),
?eval_debug_fun({?MODULE, multi_commit_sym_sync},
[{tid, Tid}, {outcome, Outcome}]),
+ [?ets_insert(Store, {waiting_for_commit_ack, Node}) || Node <- WaitFor],
rpc:abcast(DiscNs -- [node()], ?MODULE, {Tid, Outcome}),
rpc:abcast(RamNs -- [node()], ?MODULE, {Tid, Outcome}),
case Outcome of