Skip to content

Commit

Permalink
bugfix: required to be unlocked when a re-election occurs in a commit…
Browse files Browse the repository at this point in the history
… state (apache#5958)
  • Loading branch information
funky-eyes committed Oct 26, 2023
1 parent 12898d1 commit 6d4ab48
Show file tree
Hide file tree
Showing 3 changed files with 11 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 @@ -79,6 +79,7 @@ The version is updated as follows:
- [[#5835](https://github.com/seata/seata/pull/5835)] bugfix: fix TC retry rollback wrongly, after the XA transaction fail and rollback
- [[#5881](https://github.com/seata/seata/pull/5880)] fix delete branch table unlock failed
- [[#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

### optimize:
- [[#5928](https://github.com/seata/seata/pull/5928)] add Saga statelang semantic validation
Expand Down Expand Up @@ -139,6 +140,7 @@ The version is updated as follows:
- [[#5926](https://github.com/seata/seata/pull/5926)] optimize some scripts related to Apollo
- [[#5938](https://github.com/seata/seata/pull/5938)] support jmx port in seata
- [[#5951](https://github.com/seata/seata/pull/5951)] remove un support config in jdk17
- [[#5959](https://github.com/seata/seata/pull/5959)] modify code style and remove unused import

### security:
- [[#5642](https://github.com/seata/seata/pull/5642)] add Hessian Serializer WhiteDenyList
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 @@ -78,6 +78,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5835](https://github.com/seata/seata/pull/5835)] bugfix: 修复当 XA 事务失败回滚后,TC 还会继续重试回滚的问题
- [[#5881](https://github.com/seata/seata/pull/5880)] 修复事务回滚时锁未删除的问题
- [[#5930](https://github.com/seata/seata/pull/5930)] 修复存储为redis哨兵模式下哨兵密码缺失的问题
- [[#5958](https://github.com/seata/seata/pull/5958)] 在二阶段提交状态下发生重选时需要进行解除全局锁

### optimize:
- [[#5928](https://github.com/seata/seata/pull/5928)] 增加Saga模式状态机语义验证阶段
Expand Down Expand Up @@ -139,6 +140,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5926](https://github.com/seata/seata/pull/5926)] 优化一些与 Apollo 相关的脚本
- [[#5938](https://github.com/seata/seata/pull/5938)] 支持 jmx 监控配置
- [[#5951](https://github.com/seata/seata/pull/5951)] 删除在 jdk17 中不支持的配置项
- [[#5959](https://github.com/seata/seata/pull/5959)] 修正代码风格问题及去除无用的类引用


### security:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,13 @@ public static void reload(Collection<GlobalSession> allSessions, SessionMode sto
case Committing:
case CommitRetrying:
if (Objects.equals(SessionMode.RAFT, storeMode)) {
globalSession.unlock();
// When a state change occurs, re-electing the leader may result in the lock not being unlocked yet
// so a COMMIT unlock operation needs to be performed at the time of re-election
try {
globalSession.clean();
} catch (TransactionException e) {
throw new RuntimeException(e);
}
}
break;
default: {
Expand Down

0 comments on commit 6d4ab48

Please sign in to comment.