Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4d6d264

Browse files
knizhnikkelvich
authored andcommitted
Rollback only self active transactions in OnNodeDisconnect
1 parent cbe3845 commit 4d6d264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

multimaster.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ MtmEndTransaction(MtmCurrentTrans* x, bool commit)
922922
Assert(Mtm->status != MTM_RECOVERY);
923923
/*
924924
* Send notification only if ABORT happens during transaction processing at replicas,
925-
* do not send notification if ABORT is receiver from master
925+
* do not send notification if ABORT is received from master
926926
*/
927927
MTM_LOG2("%d: send ABORT notification abort transaction %d to coordinator %d", MyProcPid, x->gtid.xid, x->gtid.node);
928928
if (ts == NULL) {
@@ -1377,7 +1377,7 @@ bool MtmRefreshClusterStatus(bool nowait)
13771377
MtmCheckQuorum();
13781378
/* Interrupt voting for active transaction and abort them */
13791379
for (ts = Mtm->transListHead; ts != NULL; ts = ts->next) {
1380-
if (!ts->votingCompleted) {
1380+
if (!ts->votingCompleted && MtmIsCoordinator(ts)) {
13811381
if (ts->status != TRANSACTION_STATUS_ABORTED) {
13821382
MTM_LOG1("Rollback active transaction %d:%d", ts->gtid.node, ts->gtid.xid);
13831383
MtmAbortTransaction(ts);
@@ -1443,7 +1443,7 @@ void MtmOnNodeDisconnect(int nodeId)
14431443
MtmCheckQuorum();
14441444
/* Interrupt voting for active transaction and abort them */
14451445
for (ts = Mtm->transListHead; ts != NULL; ts = ts->next) {
1446-
if (!ts->votingCompleted) {
1446+
if (!ts->votingCompleted && MtmIsCoordinator(ts)) {
14471447
if (ts->status != TRANSACTION_STATUS_ABORTED) {
14481448
MTM_LOG1("Rollback active transaction %d:%d", ts->gtid.node, ts->gtid.xid);
14491449
MtmAbortTransaction(ts);

0 commit comments

Comments
 (0)