Skip to content

Commit 3586931

Browse files
knizhnikkelvich
authored andcommitted
Fix problem with rollback of user 2pc transaction
1 parent 61d1396 commit 3586931

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

multimaster.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,10 +1359,14 @@ MtmAbortPreparedTransaction(MtmCurrentTrans* x)
13591359
tm = (MtmTransMap*)hash_search(MtmGid2State, x->gid, HASH_FIND, NULL);
13601360
if (tm == NULL) {
13611361
MTM_ELOG(WARNING, "Global transaction ID '%s' is not found", x->gid);
1362-
} else {
1363-
Assert(tm->state != NULL);
1362+
} else {
1363+
MtmTransState* ts = tm->state;
1364+
Assert(ts != NULL);
13641365
MTM_LOG1("Abort prepared transaction %s (%llu)", x->gid, (long64)x->xid);
1365-
MtmAbortTransaction(tm->state);
1366+
MtmAbortTransaction(ts);
1367+
if (ts->isTwoPhase) {
1368+
MtmDeactivateTransaction(ts);
1369+
}
13661370
}
13671371
MtmUnlock();
13681372
x->status = TRANSACTION_STATUS_ABORTED;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy