@@ -755,9 +755,6 @@ MtmBeginTransaction(MtmCurrentTrans* x)
755
755
MtmUnlock ();
756
756
elog (ERROR , "Multimaster node is not online: current status %s" , MtmNodeStatusMnem [Mtm -> status ]);
757
757
}
758
- if (x -> isDistributed && XactIsoLevel != XACT_REPEATABLE_READ ) {
759
- elog (LOG , "Isolation level %s is not supported by multimaster" , isoLevelStr [XactIsoLevel ]);
760
- }
761
758
x -> containsDML = false;
762
759
x -> snapshot = MtmAssignCSN ();
763
760
x -> gtid .xid = InvalidTransactionId ;
@@ -984,9 +981,13 @@ MtmAbortPreparedTransaction(MtmCurrentTrans* x)
984
981
if (x -> status != TRANSACTION_STATUS_ABORTED ) {
985
982
MtmLock (LW_EXCLUSIVE );
986
983
tm = (MtmTransMap * )hash_search (MtmGid2State , x -> gid , HASH_REMOVE , NULL );
987
- Assert (tm != NULL && tm -> state != NULL );
988
- MTM_LOG1 ("Abort prepared transaction %d with gid='%s'" , x -> xid , x -> gid );
989
- MtmAbortTransaction (tm -> state );
984
+ if (tm == NULL ) {
985
+ elog (WARNING , "Global transaciton ID %s is not found" , x -> gid );
986
+ } else {
987
+ Assert (tm -> state != NULL );
988
+ MTM_LOG1 ("Abort prepared transaction %d with gid='%s'" , x -> xid , x -> gid );
989
+ MtmAbortTransaction (tm -> state );
990
+ }
990
991
MtmUnlock ();
991
992
x -> status = TRANSACTION_STATUS_ABORTED ;
992
993
} else {
@@ -3938,7 +3939,11 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
3938
3939
standard_ProcessUtility (parsetree , queryString , context ,
3939
3940
params , dest , completionTag );
3940
3941
}
3941
-
3942
+
3943
+ if (MtmTx .isDistributed && XactIsoLevel != XACT_REPEATABLE_READ ) {
3944
+ elog (ERROR , "Isolation level %s is not supported by multimaster" , isoLevelStr [XactIsoLevel ]);
3945
+ }
3946
+
3942
3947
if (MyXactAccessedTempRel )
3943
3948
{
3944
3949
MTM_LOG1 ("Xact accessed temp table, stopping replication" );
0 commit comments