[ 
https://issues.apache.org/jira/browse/ARTEMIS-4652?focusedWorklogId=909773&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909773
 ]

ASF GitHub Bot logged work on ARTEMIS-4652:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Mar/24 00:27
            Start Date: 14/Mar/24 00:27
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #4828:
URL: https://github.com/apache/activemq-artemis/pull/4828#discussion_r1524062480


##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java:
##########
@@ -1901,18 +1901,10 @@ public void rollback(final Xid xid) throws XAException {
          workDone = false;
       } catch (XAException xae) {
          throw xae;
-      } catch (ActiveMQException e) {
-         if (e.getType() == ActiveMQExceptionType.UNBLOCKED || e.getType() == 
ActiveMQExceptionType.CONNECTION_TIMEDOUT || e.getType() == 
ActiveMQExceptionType.SHUTDOWN_ERROR) {
-            // Unblocked on failover
-            throw new XAException(XAException.XA_RETRY);
-         }
-
-         // This should never occur
-         XAException xaException = new XAException(XAException.XAER_RMFAIL);
-         xaException.initCause(e);
-         throw xaException;
       } catch (Throwable t) {
-         // This could occur if the TM interrupts the thread
+         if (logger.isTraceEnabled()) {
+            logger.trace("Rollback failed:: {}", convert(xid), t);
+         }
          XAException xaException = new XAException(XAException.XAER_RMFAIL);

Review Comment:
   @jbertram @ehsavoie I merged this, but this was of course intentional as 
there was a test validating it. I sent a further commit to fix the test.
   
   
   So, if you decide against this @ehsavoie please send a revert.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 909773)
    Time Spent: 1h  (was: 50m)

> Rollback of XAResource implementation should never return XA_RETRY
> ------------------------------------------------------------------
>
>                 Key: ARTEMIS-4652
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4652
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> According to [the XA 
> spec|https://pubs.opengroup.org/onlinepubs/009680699/toc.pdf] {{XA_RETRY}} is 
> not a valid response from {{xa_rollback}}. We should return {{XAER_RMFAIL}} 
> instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to