This is an automated email from the ASF dual-hosted git repository. maxyang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push: new e1c99e4d77 Revert "Include distributed xid in transaction commit WAL in all cases" e1c99e4d77 is described below commit e1c99e4d77be44d5400530fd32ce1ace992b2fb1 Author: leo <hu...@hashdata.cn> AuthorDate: Fri Mar 28 10:27:37 2025 +0800 Revert "Include distributed xid in transaction commit WAL in all cases" This reverts commit eea5a1f150cf934e819112f07d7c280b8212df84. This is not needed currently, and will enlarge the size of COMMIT PREPARED XLOG. --- src/backend/access/transam/xact.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index feeb0677b8..60f9d16b1a 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -6875,8 +6875,8 @@ XactLogCommitRecord(TimestampTz commit_time, xl_xact_distrib xl_distrib; xl_xact_deldbs xl_deldbs; XLogRecPtr recptr; + bool isOnePhaseQE = (Gp_role == GP_ROLE_EXECUTE && MyTmGxactLocal->isOnePhaseCommit); bool isDtxPrepared = isPreparedDtxTransaction(); - DistributedTransactionId distrib_xid = getDistributedTransactionId(); uint8 info; @@ -6966,11 +6966,10 @@ XactLogCommitRecord(TimestampTz commit_time, xl_origin.origin_timestamp = replorigin_session_origin_timestamp; } - /* include distributed xid if there's one */ - if (distrib_xid != InvalidDistributedTransactionId) + if (isDtxPrepared || isOnePhaseQE) { xl_xinfo.xinfo |= XACT_XINFO_HAS_DISTRIB; - xl_distrib.distrib_xid = distrib_xid; + xl_distrib.distrib_xid = getDistributedTransactionId(); } #if 0 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org