diff --git a/changes/en-us/2.0.0.md b/changes/en-us/2.0.0.md index 9d7a6fd90dd..bdfb31cc6d5 100644 --- a/changes/en-us/2.0.0.md +++ b/changes/en-us/2.0.0.md @@ -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 @@ -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 diff --git a/changes/zh-cn/2.0.0.md b/changes/zh-cn/2.0.0.md index 5e62d865feb..439803dc318 100644 --- a/changes/zh-cn/2.0.0.md +++ b/changes/zh-cn/2.0.0.md @@ -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模式状态机语义验证阶段 @@ -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: diff --git a/server/src/main/java/io/seata/server/session/SessionHolder.java b/server/src/main/java/io/seata/server/session/SessionHolder.java index a0677ce0239..2ebc3b5e44d 100644 --- a/server/src/main/java/io/seata/server/session/SessionHolder.java +++ b/server/src/main/java/io/seata/server/session/SessionHolder.java @@ -183,7 +183,13 @@ public static void reload(Collection 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: {