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