sixlei commented on code in PR #6569:
URL: https://github.com/apache/incubator-seata/pull/6569#discussion_r1634051263
##########
rm-datasource/src/main/java/org/apache/seata/rm/datasource/undo/AbstractUndoLogManager.java:
##########
@@ -339,20 +339,22 @@ public void undo(DataSourceProxy dataSourceProxy, String
xid, long branchId) thr
State.GlobalFinished.name());
}
} else {
- insertUndoLogWithGlobalFinished(xid, branchId,
UndoLogParserFactory.getInstance(), conn);
- conn.commit();
- if (LOGGER.isInfoEnabled()) {
- LOGGER.info("xid {} branch {}, undo_log added with
{}", xid, branchId,
- State.GlobalFinished.name());
+ try {
+ insertUndoLogWithGlobalFinished(xid, branchId,
UndoLogParserFactory.getInstance(), conn);
Review Comment:
The changes here are to narrow the scope of the catch for
SQLIntegrityConstraintViolationException at the outermost level, only handling
conflicts with the unique index on the undo_log. If the unique index conflict
also occurs when executing the rollback undoExecutor.executeOn for the
business, it will enter a deadlock directly here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]