We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent9b896e6 commitac34bd8Copy full SHA for ac34bd8
multimaster.c
@@ -1109,9 +1109,14 @@ MtmEndTransaction(MtmCurrentTrans* x, bool commit)
1109
}
1110
if (ts!=NULL) {
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 */
+if (!(ts->status==TRANSACTION_STATUS_UNKNOWN
+|| (ts->status==TRANSACTION_STATUS_IN_PROGRESS&&Mtm->status==MTM_RECOVERY)))
+{
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
+}
1120
if (x->csn>ts->csn||Mtm->status==MTM_RECOVERY) {
1121
ts->csn=x->csn;
1122
MtmSyncClock(ts->csn);