Skip to content

Commit

Permalink
bugfix: treating a unique index conflict during rollback as a dirty w…
Browse files Browse the repository at this point in the history
…rite (#7135)
  • Loading branch information
YongGoose authored Feb 6, 2025
1 parent 86029bb commit 67548df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
4 changes: 3 additions & 1 deletion changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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和建议,非常感谢大家。
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ public void flushUndoLogs(ConnectionProxy cp) throws SQLException {
* @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 {
Expand Down Expand Up @@ -363,6 +364,9 @@ public void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) thr
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();
Expand Down

0 comments on commit 67548df

Please sign in to comment.