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