Skip to content

Commit

Permalink
bugfix: fix the issue of saved branch session status does not match t…
Browse files Browse the repository at this point in the history
…he actual branch session status (apache#5954)
  • Loading branch information
aruato committed Nov 2, 2023
1 parent e1045b0 commit 7fff1d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changes/en-us/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ The version is updated as follows:
- [[#5930](https://github.com/seata/seata/pull/5930)] fix the issue of missing sentinel password in store redis mode
- [[#5958](https://github.com/seata/seata/pull/5958)] required to be unlocked when a re-election occurs in a commit state
- [[#5971](https://github.com/seata/seata/pull/5971)] fix some configurations that are not deprecated show "Deprecated"
- [[#5954](https://github.com/seata/seata/pull/5954)] fix the issue of saved branch session status does not match the actual branch session status

### optimize:
- [[#5966](https://github.com/seata/seata/pull/5966)] decouple saga expression handling and remove evaluator package
Expand Down Expand Up @@ -201,6 +202,7 @@ Thanks to these contributors for their code commits. Please report an unintended
- [Ifdevil](https://github.com/Ifdevil)
- [iquanzhan](https://github.com/iquanzhan)
- [leizhiyuan](https://github.com/leizhiyuan)
- [Aruato](https://github.com/Aruato)

Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.

Expand Down
2 changes: 2 additions & 0 deletions changes/zh-cn/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5930](https://github.com/seata/seata/pull/5930)] 修复存储为redis哨兵模式下哨兵密码缺失的问题
- [[#5958](https://github.com/seata/seata/pull/5958)] 在二阶段提交状态下发生重选时需要进行解除全局锁
- [[#5971](https://github.com/seata/seata/pull/5971)] 修复某些未弃用的配置显示"已弃用"
- [[#5954](https://github.com/seata/seata/pull/5954)] 修复保存的分支会话状态与实际的分支会话状态不一致的问题

### optimize:
- [[#5966](https://github.com/seata/seata/pull/5966)] Saga 表达式解耦并统一格式
Expand Down Expand Up @@ -201,6 +202,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [Ifdevil](https://github.com/Ifdevil)
- [iquanzhan](https://github.com/iquanzhan)
- [leizhiyuan](https://github.com/leizhiyuan)
- [Aruato](https://github.com/Aruato)

同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ public void addBranch(BranchSession branchSession) throws TransactionException {
lifecycleListener.onAddBranch(this, branchSession);
}
if (!RaftServerFactory.getInstance().isRaftMode()) {
branchSession.setStatus(BranchStatus.Registered);
add(branchSession);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import io.seata.config.ConfigurationFactory;
import io.seata.core.context.RootContext;
import io.seata.core.exception.TransactionException;
import io.seata.core.model.BranchStatus;
import io.seata.core.model.BranchType;
import io.seata.core.model.GlobalStatus;
import io.seata.metrics.IdConstants;
Expand Down Expand Up @@ -104,6 +105,7 @@ public static BranchSession newBranchByGlobal(GlobalSession globalSession, Branc
branchSession.setLockKey(lockKeys);
branchSession.setClientId(clientId);
branchSession.setApplicationData(applicationData);
branchSession.setStatus(BranchStatus.Registered);

return branchSession;
}
Expand Down

0 comments on commit 7fff1d1

Please sign in to comment.