This is an automated email from the ASF dual-hosted git repository. jianbin pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push: new 67548dfa69 bugfix: treating a unique index conflict during rollback as a dirty write (#7135) 67548dfa69 is described below commit 67548dfa69f988bd3544075f39078c3cc578bb36 Author: Yongjun Hong <kevin0...@naver.com> AuthorDate: Thu Feb 6 16:47:51 2025 +0900 bugfix: treating a unique index conflict during rollback as a dirty write (#7135) --- changes/en-us/2.x.md | 2 ++ changes/zh-cn/2.x.md | 4 +++- .../org/apache/seata/rm/datasource/undo/AbstractUndoLogManager.java | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index f528638cf9..b4b6643adb 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -17,6 +17,7 @@ Add changes here for all PR submitted to the 2.x branch. - [[#7112](https://github.com/apache/incubator-seata/pull/7112)] bugfix: remove the condition that IPv6 must start with fe80 - [[#7107](https://github.com/apache/incubator-seata/pull/7107)] fix the issue of failing to parse annotations in TCC mode when the business object is a proxy object. - [[#7124](https://github.com/apache/incubator-seata/pull/7124)] bugfix: GlobalTransactionScanner.afterPropertiesSet need do scanner check +- [[#7135](https://github.com/apache/incubator-seata/pull/7135)] treating a unique index conflict during rollback as a dirty write ### optimize: @@ -59,5 +60,6 @@ Thanks to these contributors for their code commits. Please report an unintended - [xiaoxiangyeyu0](https://github.com/xiaoxiangyeyu0) - [wxrqforever](https://github.com/wxrqforever) - [xingfudeshi](https://github.com/xingfudeshi) +- [YongGoose](https://github.com/YongGoose) Also, we receive many valuable issues, questions and advices from our community. Thanks for you all. diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index 3633280de7..328ad09f36 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -17,6 +17,7 @@ - [[#7112](https://github.com/apache/incubator-seata/pull/7112)] 校验是否IPv6网络ip取消必须以fe80开始的条件 - [[#7107](https://github.com/apache/incubator-seata/pull/7107)] 修复tcc模式下,当业务对象为代理对象时,解析注解失败问题。 - [[#7124](https://github.com/apache/incubator-seata/pull/7124)] GlobalTransactionScanner.afterPropertiesSet方法需要做扫描检查 +- [[#7135](https://github.com/apache/incubator-seata/pull/7135)] 回滚时遇到唯一索引冲突视为脏写 ### optimize: @@ -58,5 +59,6 @@ - [xiaoxiangyeyu0](https://github.com/xiaoxiangyeyu0) - [wxrqforever](https://github.com/wxrqforever) - [xingfudeshi](https://github.com/xingfudeshi) -- +- [YongGoose](https://github.com/YongGoose) + 同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。 diff --git a/rm-datasource/src/main/java/org/apache/seata/rm/datasource/undo/AbstractUndoLogManager.java b/rm-datasource/src/main/java/org/apache/seata/rm/datasource/undo/AbstractUndoLogManager.java index d9ba6bb3f3..5089c58adc 100644 --- a/rm-datasource/src/main/java/org/apache/seata/rm/datasource/undo/AbstractUndoLogManager.java +++ b/rm-datasource/src/main/java/org/apache/seata/rm/datasource/undo/AbstractUndoLogManager.java @@ -298,6 +298,7 @@ public abstract class AbstractUndoLogManager implements UndoLogManager { * @param xid the xid * @param branchId the branch id * @throws TransactionException the transaction exception + * @throws BranchTransactionException the branch transaction exception */ @Override public void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) throws TransactionException { @@ -363,6 +364,9 @@ public abstract class AbstractUndoLogManager implements UndoLogManager { dataSourceProxy.getDbType(), sqlUndoLog); undoExecutor.executeOn(connectionProxy); } + } catch (SQLIntegrityConstraintViolationException ex) { + throw new BranchTransactionException(BranchRollbackFailed_Unretriable, + String.format("Branch session rollback failed. xid = %s branchId = %s", xid, branchId), ex); } finally { // remove serializer name removeCurrentSerializer(); --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org