Skip to content

Commit

Permalink
bugfix: Fix missing branchType in BusinessActionContext (#7188)
Browse files Browse the repository at this point in the history
  • Loading branch information
YongGoose authored Mar 3, 2025
1 parent cde5a7d commit ba1f753
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 2 additions & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ba1f753

Please sign in to comment.