File tree 1 file changed +12
-1
lines changed 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -836,7 +836,7 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
836
836
MtmUnlock ();
837
837
MtmResetTransaction (x );
838
838
} else {
839
- time_t transTimeout = Max (MSEC_TO_USEC (Mtm2PCMinTimeout ), (ts -> csn - ts -> snapshot )* Mtm2PCPrepareRatio /100 ); /* usec->msec and percents */
839
+ time_t transTimeout = Max (MSEC_TO_USEC (Mtm2PCMinTimeout ), (ts -> csn - ts -> snapshot )* Mtm2PCPrepareRatio /100 );
840
840
int result = 0 ;
841
841
int nConfigChanges = Mtm -> nConfigChanges ;
842
842
@@ -1344,6 +1344,7 @@ bool MtmRefreshClusterStatus(bool nowait)
1344
1344
nodemask_t mask , clique ;
1345
1345
nodemask_t matrix [MAX_NODES ];
1346
1346
int clique_size ;
1347
+ MtmTransState * ts ;
1347
1348
int i ;
1348
1349
1349
1350
if (!MtmUseRaftable || !MtmBuildConnectivityMatrix (matrix , nowait )) {
@@ -1379,6 +1380,16 @@ bool MtmRefreshClusterStatus(bool nowait)
1379
1380
}
1380
1381
}
1381
1382
MtmCheckQuorum ();
1383
+ /* Interrupt voting for active transaction and abort them */
1384
+ for (ts = Mtm -> transListHead ; ts != NULL ; ts = ts -> next ) {
1385
+ if (!ts -> votingCompleted ) {
1386
+ if (ts -> status != TRANSACTION_STATUS_ABORTED ) {
1387
+ MTM_LOG1 ("Rollback active transaction %d:%d" , ts -> gtid .node , ts -> gtid .xid );
1388
+ MtmAbortTransaction (ts );
1389
+ }
1390
+ MtmWakeUpBackend (ts );
1391
+ }
1392
+ }
1382
1393
MtmUnlock ();
1383
1394
if (BIT_CHECK (Mtm -> disabledNodeMask , MtmNodeId - 1 )) {
1384
1395
if (Mtm -> status == MTM_ONLINE ) {
You can’t perform that action at this time.
0 commit comments