Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-28350

Missing XA transaction after abort

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • None
    • Transactions
    • None
    • False
    • None
    • False

      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

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

                Created:
                Updated: