Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0914-mnesia-Do-not-handle-stray-messages-in-par...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0914-mnesia-Do-not-handle-stray-messages-in-participant.patch of Package erlang
From d223065466977b96cae4d62316d25480b568b427 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson <dgud@erlang.org> Date: Thu, 10 Feb 2022 11:56:47 +0100 Subject: [PATCH 3/3] mnesia: Do not handle stray messages in participant The process may get messages when using transactions for table copying, this may cause the transaction to abort and it that case (table copying) not undo the transaction completely and leave the meta-data in an inconsistent state. --- lib/mnesia/src/mnesia_tm.erl | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/mnesia/src/mnesia_tm.erl b/lib/mnesia/src/mnesia_tm.erl index 9e9661ff60..d6d1f74392 100644 --- a/lib/mnesia/src/mnesia_tm.erl +++ b/lib/mnesia/src/mnesia_tm.erl @@ -1728,11 +1728,7 @@ commit_participant(Protocol, Coord, Tid, Bin, C0, DiscNs, _RamNs) -> {'EXIT', _MnesiaTM, Reason} -> reply(Coord, {do_abort, Tid, self(), {bad_commit,Reason}}), mnesia_recover:log_decision(D#decision{outcome = aborted}), - mnesia_schema:undo_prepare_commit(Tid, C0); - - Msg -> - verbose("** ERROR ** commit_participant ~p, got unexpected msg: ~tp~n", - [Tid, Msg]) + mnesia_schema:undo_prepare_commit(Tid, C0) end; {Tid, {do_abort, Reason}} -> reply(Coord, {do_abort, Tid, self(), Reason}), @@ -1743,12 +1739,7 @@ commit_participant(Protocol, Coord, Tid, Bin, C0, DiscNs, _RamNs) -> {'EXIT', _, Reason} -> reply(Coord, {do_abort, Tid, self(), {bad_commit,Reason}}), mnesia_schema:undo_prepare_commit(Tid, C0), - ?eval_debug_fun({?MODULE, commit_participant, pre_commit_undo_prepare}, [{tid, Tid}]); - - Msg -> - reply(Coord, {do_abort, Tid, self(), {bad_commit,internal}}), - verbose("** ERROR ** commit_participant ~p, got unexpected msg: ~tp~n", - [Tid, Msg]) + ?eval_debug_fun({?MODULE, commit_participant, pre_commit_undo_prepare}, [{tid, Tid}]) end catch _:Reason -> ?eval_debug_fun({?MODULE, commit_participant, vote_no}, -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor