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