Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19900

Missing XA transaction after abort

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 34.0.0.Final
    • Transactions
    • None
    • Hide
      1. Download the latest Wildfly 34.0.0.Final and unzip it. Set JBOSS_HOME env variable to unzipped directory.
      2. git clone -b master git@gitlab.cee.redhat.com:jbossqe-eap/tests-transactions.git
        • optionally allow artemis traces on WildFly binaries
          /subsystem=logging/console-handler=CONSOLE:write-attribute(name=level,value=ALL)
          /subsystem=logging/logger=org.apache.activemq.artemis:add(level=TRACE)
          
      3. mvn clean verify -Djboss.dist=${JBOSS_HOME} -Dcategory=Jms -Dskip-download-sources -U --batch-mode -Dmaven.test.failure.ignore=true -Dsurefire.test.failure.ignore=true --fail-never -Dclient.side.transaction -Dversion.server=34.0.0.Final  -Dtest=JMSProxyMessagingServerCrashRecoveryTestCase#prepareHaltWithAbortFails
      Show
      Download the latest Wildfly 34.0.0.Final and unzip it. Set JBOSS_HOME env variable to unzipped directory. git clone -b master git@gitlab.cee.redhat.com:jbossqe-eap/tests-transactions.git optionally allow artemis traces on WildFly binaries /subsystem=logging/console-handler=CONSOLE:write-attribute(name=level,value=ALL) /subsystem=logging/logger=org.apache.activemq.artemis:add(level=TRACE) mvn clean verify -Djboss.dist=${JBOSS_HOME} -Dcategory=Jms -Dskip-download-sources -U --batch-mode -Dmaven.test.failure.ignore=true -Dsurefire.test.failure.ignore=true --fail-never -Dclient.side.transaction -Dversion.server=34.0.0.Final  -Dtest=JMSProxyMessagingServerCrashRecoveryTestCase#prepareHaltWithAbortFails
    • ---
    • ---

      There is regression in the org.jboss.as.test.jbossts.crashrec.test.JMSProxyMessagingServerCrashRecoveryTestCase(jts).prepareHaltWithAbortFails test:

      This test simulates fact of disconnecting application server from network where both XA resources would need connection to its work.
      TestXAResource behaves here by spec and we are checking how behaves the real XA resource.
      Behaving by spec on connection failure means:
       - XAResource.prepare -> XAERR_RMFAIL
       - XAResource.commit -> XAERR_RMFAIL (or XA_RETRY)
       - XAResource.rollback -> XAERR_RMFAIL
           *
      Test flow - JTA
      1) prepare db/jms XA
      2) stop connection to DB/JMS
      3) prepare test XA
      4) test XA simulates an error -> XAException.XAER_RMFAIL
      5) doAbort phase
      6) rollback db/jms XA (connection is down - jdbc driver throws
         XAException.XAER_RMFAIL for Oracle, DB2 and AMQ >EAP7.0.0.DR8; XAException.XAER_RMERR for others,
         specification says that XAER_RMERR means unexpected error and TM so behaves
         as the branch would be heuristic)
      7) rollback test XA -> XAException.XAER_RMFAIL
      
      JTS
      ===
      JTS behaves differently from JTA as it consider TM manager being on a remote machine (not in the same JVM)
      as the running code is. That has several implications - see https://developer.jboss.org/thread/260665
      XAER_RMFAIL (client gets)
      8) HeuristicException is returned to client, tm object log store contains uid in prepared state
      recovery: leave the txn as it is as it has heuristic state and waiting for user so
      

       

      Expected results: There should be one in-doubt XA transaction after step 7) in the object store. 

      Actual result: There is no XA transaction after step 7) in the object store. 

      By bisecting the commits the change is caused by work on JBTM-3838 by commit: https://github.com/jbosstm/narayana/commit/7f41fcb996ad3492a8718d762b47ce5616499c82

      Trace logs attached - see logs.zip

              thjenkin@redhat.com Tom Jenkinson
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: