Skip to content

Commit cef84ed

Browse files
committed
Fix wrong assertion in MtmEndTransaction().
MtmBroadcastPollMessage() also happens when old prepared tx are restored, but we are still in DISABLED mode. So it is legal to finish in-progress transaction.
1 parent a83a640 commit cef84ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/mmts/multimaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ MtmEndTransaction(MtmCurrentTrans* x, bool commit)
15301530
(commit ? "commit" : "rollback"), ts->gid, ts->xid, ts->gtid.node, ts->gtid.xid, MtmTxnStatusMnem[ts->status]);
15311531
if (commit) {
15321532
if (!(ts->status == TRANSACTION_STATUS_UNKNOWN
1533-
|| (ts->status == TRANSACTION_STATUS_IN_PROGRESS && Mtm->status == MTM_RECOVERY)))
1533+
|| (ts->status == TRANSACTION_STATUS_IN_PROGRESS && Mtm->status <= MTM_RECOVERY)))
15341534
{
15351535
MtmUnlock();
15361536
MTM_ELOG(ERROR, "Attempt to commit %s transaction %s (%llu)",

0 commit comments

Comments
 (0)