File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1109,9 +1109,14 @@ MtmEndTransaction(MtmCurrentTrans* x, bool commit)
1109
1109
}
1110
1110
if (ts != NULL ) {
1111
1111
if (commit ) {
1112
- /* Assert(ts->status == TRANSACTION_STATUS_UNKNOWN); */
1113
- Assert (ts -> status == TRANSACTION_STATUS_UNKNOWN
1114
- || (ts -> status == TRANSACTION_STATUS_IN_PROGRESS && Mtm -> status == MTM_RECOVERY )); /* ??? Why there is commit without prepare */
1112
+ if (!(ts -> status == TRANSACTION_STATUS_UNKNOWN
1113
+ || (ts -> status == TRANSACTION_STATUS_IN_PROGRESS && Mtm -> status == MTM_RECOVERY )))
1114
+ {
1115
+ elog (ERROR , "Attempt to commit %s transaction %d (%s)" ,
1116
+ ts -> status == TRANSACTION_STATUS_ABORTED ? "aborted"
1117
+ : ts -> status == TRANSACTION_STATUS_COMMITTED ? "committed" : "not prepared" ,
1118
+ ts -> xid , ts -> gid );
1119
+ }
1115
1120
if (x -> csn > ts -> csn || Mtm -> status == MTM_RECOVERY ) {
1116
1121
ts -> csn = x -> csn ;
1117
1122
MtmSyncClock (ts -> csn );
You can’t perform that action at this time.
0 commit comments