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

Commit df7106d

Browse files
committed
Rollback only self active transactions in OnNodeDisconnect
1 parent 31d659a commit df7106d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/mmts/multimaster.c

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

0 commit comments

Comments
 (0)