xiaoxiangyeyu0 commented on code in PR #7102:
URL: https://github.com/apache/incubator-seata/pull/7102#discussion_r1912920037


##########
rm-datasource/src/main/java/org/apache/seata/rm/datasource/xa/ConnectionProxyXA.java:
##########
@@ -223,34 +233,12 @@ public synchronized void commit() throws SQLException {
             throw new SQLException("should NOT commit on an inactive session", 
SQLSTATE_XA_NOT_END);
         }
         try {
-            // XA End: Success
-            try {
-                end(XAResource.TMSUCCESS);
-            } catch (SQLException sqle) {
-                // Rollback immediately before the XA Branch Context is 
deleted.
-                String xaBranchXid = this.xaBranchXid.toString();
-                rollback();
-                throw new SQLException("Branch " + xaBranchXid + " was 
rollbacked on committing since " + sqle.getMessage(), SQLSTATE_XA_NOT_END, 
sqle);
-            }
-            long now = System.currentTimeMillis();
-            checkTimeout(now);
-            setPrepareTime(now);
-            int prepare = xaResource.prepare(xaBranchXid);
-            // Based on the four databases: MySQL (8), Oracle (12c), Postgres 
(16), and MSSQL Server (2022),
-            // only Oracle has read-only optimization; the others do not 
provide read-only feedback.
-            // Therefore, the database type check can be eliminated here.
-            if (prepare == XAResource.XA_RDONLY) {
-                // Branch Report to TC: RDONLY
-                reportStatusToTC(BranchStatus.PhaseOne_RDONLY);
-            }
-        } catch (XAException xe) {
-            // Branch Report to TC: Failed
-            reportStatusToTC(BranchStatus.PhaseOne_Failed);
-            throw new SQLException(
-                "Failed to end(TMSUCCESS)/prepare xa branch on " + xid + "-" + 
xaBranchXid.getBranchId() + " since " + xe
-                    .getMessage(), xe);
+            xaEnd(xaBranchXid, XAResource.TMSUCCESS);

Review Comment:
   已调整为end方法



-- 
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: notifications-unsubscr...@seata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to