diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index 5ee09f6c0ba..4297d7045c3 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -27,6 +27,7 @@ Add changes here for all PR submitted to the 2.x branch. - [[#7135](https://github.com/apache/incubator-seata/pull/7135)] treating a unique index conflict during rollback as a dirty write - [[#7150](https://github.com/apache/incubator-seata/pull/7150)] The time difference between the raft node and the follower node cannot synchronize data - [[#7102](https://github.com/apache/incubator-seata/pull/7150)] bugfix: modify XA mode pre commit transaction from commit phase to before close phase +- [[#7188](https://github.com/apache/incubator-seata/pull/7188)] bugfix: Fix missing branchType in BusinessActionContext ### optimize: diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index e46730f8c06..f0e03e29d11 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -27,6 +27,8 @@ - [[#7135](https://github.com/apache/incubator-seata/pull/7135)] 回滚时遇到唯一索引冲突视为脏写 - [[#7150](https://github.com/apache/incubator-seata/pull/7150)] raft节点之前时间差,follower节点无法同步数据 - [[#7102](https://github.com/apache/incubator-seata/pull/7150)] 将XA模式预提交事务从提交阶段修改为关闭前阶段 +- [[#7188](https://github.com/apache/incubator-seata/pull/7188)] 修复 BusinessActionContext 中缺少的 branchType + ### optimize: diff --git a/tcc/src/main/java/org/apache/seata/rm/tcc/TCCResourceManager.java b/tcc/src/main/java/org/apache/seata/rm/tcc/TCCResourceManager.java index ca49136ae1c..e252caf0ca4 100644 --- a/tcc/src/main/java/org/apache/seata/rm/tcc/TCCResourceManager.java +++ b/tcc/src/main/java/org/apache/seata/rm/tcc/TCCResourceManager.java @@ -121,6 +121,7 @@ public BranchStatus branchCommit(BranchType branchType, String xid, long branchI //BusinessActionContext businessActionContext = BusinessActionContextUtil.getBusinessActionContext(xid, branchId, resourceId, applicationData); + businessActionContext.setBranchType(branchType); Object[] args = this.getTwoPhaseCommitArgs(tccResource, businessActionContext); //share actionContext implicitly @@ -188,6 +189,8 @@ public BranchStatus branchRollback(BranchType branchType, String xid, long branc //BusinessActionContext businessActionContext = BusinessActionContextUtil.getBusinessActionContext(xid, branchId, resourceId, applicationData); + businessActionContext.setBranchType(branchType); + Object[] args = this.getTwoPhaseRollbackArgs(tccResource, businessActionContext); //share actionContext implicitly BusinessActionContextUtil.setContext(businessActionContext);