diff --git a/changes/en-us/develop.md b/changes/en-us/develop.md index ae5e4336ca8..2a871211b38 100644 --- a/changes/en-us/develop.md +++ b/changes/en-us/develop.md @@ -17,6 +17,7 @@ Add changes here for all PR submitted to the develop branch. - [[#5281](https://github.com/seata/seata/pull/5281)] parallel request handle throw IndexOutOfBoundsException - [[#5288](https://github.com/seata/seata/pull/5288)] fix auto-increment of pk columns in Oracle in AT mode - [[#5287](https://github.com/seata/seata/pull/5287)] fix auto-increment of pk columns in PostgreSQL in AT mode +- [[#5299](https://github.com/seata/seata/pull/5299)] fix GlobalSession deletion when retry rollback or retry commit timeout - [[#5307](https://github.com/seata/seata/pull/5307)] fix that keywords don't add escaped characters @@ -52,6 +53,7 @@ Thanks to these contributors for their code commits. Please report an unintended - [GoodBoyCoder](https://github.com/GoodBoyCoder) - [a364176773](https://github.com/a364176773) - [isharpever](https://github.com/isharpever) +- [ZhangShiYeChina](https://github.com/ZhangShiYeChina) - [mxsm](https://github.com/mxsm) diff --git a/changes/zh-cn/develop.md b/changes/zh-cn/develop.md index f2dce728093..0eb28867ed9 100644 --- a/changes/zh-cn/develop.md +++ b/changes/zh-cn/develop.md @@ -17,6 +17,7 @@ - [[#5281](https://github.com/seata/seata/pull/5281)] 修复并行rm请求处理时数组索引越界问题 - [[#5288](https://github.com/seata/seata/pull/5288)] 修复AT模式下oracle的主键列自增的问题 - [[#5287](https://github.com/seata/seata/pull/5287)] 修复AT模式下pgsql的主键列自增的问题 +- [[#5299](https://github.com/seata/seata/pull/5299)] 修复TC端重试回滚或重试提交超时GlobalSession的删除问题 - [[#5307](https://github.com/seata/seata/pull/5307)] 修复生成update前后镜像sql不对关键字转义的bug ### optimize: @@ -51,6 +52,7 @@ - [GoodBoyCoder](https://github.com/GoodBoyCoder) - [a364176773](https://github.com/a364176773) - [isharpever](https://github.com/isharpever) +- [ZhangShiYeChina](https://github.com/ZhangShiYeChina) - [mxsm](https://github.com/mxsm) diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/MySQLUndoUpdateExecutor.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/MySQLUndoUpdateExecutor.java index 52df100d047..50c59cf6bc5 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/MySQLUndoUpdateExecutor.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/MySQLUndoUpdateExecutor.java @@ -37,7 +37,7 @@ public class MySQLUndoUpdateExecutor extends AbstractUndoExecutor { /** - * UPDATE a SET x = ?, y = ?, z = ? WHERE pk1 in (?) pk2 in (?) + * UPDATE a SET x = ?, y = ?, z = ? WHERE pk1 =? and pk2 =? */ private static final String UPDATE_SQL_TEMPLATE = "UPDATE %s SET %s WHERE %s "; diff --git a/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java b/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java index 75c09ac2d2a..b1f41d64436 100644 --- a/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java +++ b/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java @@ -383,9 +383,6 @@ protected void handleRetryRollbacking() { if (ROLLBACK_RETRY_TIMEOUT_UNLOCK_ENABLE) { rollbackingSession.clean(); } - // Prevent thread safety issues - SessionHolder.getRetryRollbackingSessionManager().removeGlobalSession(rollbackingSession); - LOGGER.error("Global transaction rollback retry timeout and has removed [{}]", rollbackingSession.getXid()); SessionHelper.endRollbackFailed(rollbackingSession, true, true); @@ -421,9 +418,6 @@ protected void handleRetryCommitting() { return; } if (isRetryTimeout(now, MAX_COMMIT_RETRY_TIMEOUT, committingSession.getBeginTime())) { - // Prevent thread safety issues - SessionHolder.getRetryCommittingSessionManager().removeGlobalSession(committingSession); - LOGGER.error("Global transaction commit retry timeout and has removed [{}]", committingSession.getXid()); // commit retry timeout event SessionHelper.endCommitFailed(committingSession, true, true);