funky-eyes commented on code in PR #6569:
URL: https://github.com/apache/incubator-seata/pull/6569#discussion_r1704859517


##########
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);
+                        conn.commit();
+                        if (LOGGER.isInfoEnabled()) {
+                            LOGGER.info("xid {} branch {}, undo_log added with 
{}", xid, branchId,
+                                    State.GlobalFinished.name());
+                        }
+                    } catch (SQLIntegrityConstraintViolationException e) {

Review Comment:
   
你只是使SQLIntegrityConstraintViolationException的范围缩小了,但是并没将因为唯一索引导致的SQLIntegrityConstraintViolationException
 
转换成SQLUndoDirtyException或者说抛出BranchRollbackFailed_Unretriable状态的BranchTransactionException,目前的改动我认为是无效的
   
   You have merely narrowed the scope of 
SQLIntegrityConstraintViolationException without converting 
SQLIntegrityConstraintViolationException caused by unique indexes into 
SQLUndoDirtyException or throwing BranchTransactionException with 
BranchRollbackFailed_Unretriable state. I find the current changes ineffective.



-- 
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]

Reply via email to