Revert a minor change for MOT

This commit is contained in:
Vinoth Veeraraghavan
2023-01-04 09:49:26 +08:00
parent fefebd6a20
commit e5c2b913ba

View File

@ -7210,6 +7210,13 @@ static void xact_redo_commit_internal(TransactionId xid, XLogRecPtr lsn, Transac
}
if (t_thrd.xlog_cxt.standbyState == STANDBY_DISABLED) {
#ifdef ENABLE_MOT
/*
* Report committed transaction to MOT Engine.
*/
CallRedoCommitCallback(xid);
#endif
/*
* Mark the transaction committed in pg_xact. We don't bother updating
* pg_csnlog during replay.
@ -7243,6 +7250,13 @@ static void xact_redo_commit_internal(TransactionId xid, XLogRecPtr lsn, Transac
} else {
CSNLogRecordAssignedTransactionId(max_xid);
#ifdef ENABLE_MOT
/*
* Report committed transaction to MOT Engine.
*/
CallRedoCommitCallback(xid);
#endif
/*
* Mark the transaction committed in pg_clog. We use async commit
* protocol during recovery to provide information on database
@ -7302,17 +7316,6 @@ static void xact_redo_commit_internal(TransactionId xid, XLogRecPtr lsn, Transac
StandbyReleaseLockTree(xid, 0, NULL);
}
#ifdef ENABLE_MOT
/*
* Report committed transaction to MOT Engine.
* If (XactMOTEngineUsed(xinfo)) - This is an optimization to avoid calling
* MOT redo commit callbacks in case of commit does not have MOT records.
* It is disabled for the time being since data used to identify storage
* engine type is cleared in 2phase commit prepare phase.
*/
CallRedoCommitCallback(xid);
#endif
xact_redo_forget_alloc_segs(xid, sub_xids, nsubxacts, lsn);
/* Make sure files supposed to be dropped are dropped */