You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "funky-eyes (via GitHub)" <gi...@apache.org> on 2024/09/08 06:06:40 UTC

Re: [PR] bugfix: the issue where connection held during the first phase of PostgreSQL cannot be rollback [incubator-seata]

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


##########
rm-datasource/src/main/java/org/apache/seata/rm/datasource/xa/ConnectionProxyXA.java:
##########
@@ -140,8 +140,12 @@ public synchronized void xaCommit(String xid, long branchId, String applicationD
      * @param applicationData application data
      */
     public synchronized void xaRollback(String xid, long branchId, String applicationData) throws XAException {
-        XAXid xaXid = XAXidBuilder.build(xid, branchId);
-        xaRollback(xaXid);
+    	if(this.xaBranchXid != null) {
+    		xaRollback(xaBranchXid);
+    	}else {
+    		XAXid xaXid = XAXidBuilder.build(xid, branchId);
+    		xaRollback(xaXid);
+    	}

Review Comment:
   代码用idea的code format下这个代码块
   Code Use the idea code format for this code block



-- 
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-unsubscribe@seata.apache.org

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


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