Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-2780

JTS recovery does not process commit when connection is halt during 2PC

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 5.3.5.Final
    • JTS, Recovery
    • None
    • Hide

      The behavior could be observed when jts test is run in crashrec testsuite.
      Test does not fail every time as it could happen that txn is rolled back and MDB then process the message for second time and thus the final checks can observe message being committed. But the server log always show what was the process.

      git clone http://git.app.eng.bos.redhat.com/git/jbossqe-eap-tests-transactions.git
      export JBOSS_HOME=... (downloadable at http://download.eng.brq.redhat.com/devel/candidates/JBEAP/)
      mvn clean verify -am -pl jbossts -DfailIfNoTests=false -Djbossts.noJTA -Dtest=JMSProxyMdbMessagingServerCrashRecoveryTestCase#haltConnectionAfterDbCommits
      
      Show
      The behavior could be observed when jts test is run in crashrec testsuite. Test does not fail every time as it could happen that txn is rolled back and MDB then process the message for second time and thus the final checks can observe message being committed. But the server log always show what was the process. git clone http: //git.app.eng.bos.redhat.com/git/jbossqe-eap-tests-transactions.git export JBOSS_HOME=... (downloadable at http: //download.eng.brq.redhat.com/devel/candidates/JBEAP/) mvn clean verify -am -pl jbossts -DfailIfNoTests= false -Djbossts.noJTA -Dtest=JMSProxyMdbMessagingServerCrashRecoveryTestCase#haltConnectionAfterDbCommits

      I experience wrong behavior of JTS implementation in following test scenario. This seems to be a regression against behavior of recovery for 7.0.0.GA.

      1. there is two jboss eap 7.1.0.DR6 servers used. First deploys MDB and does periodic recovery. Second is used only as a Artemis messaging broker.
      2. first app server receives a message via MDB #onMessage from artemis broker (second eap server)
      3. during onMessage processing a enw message is send to different remote queue on artemis broker
      4. testing XA resource is enlisted to txn
      5. prepare phase passes for all 3 resources - mdb inbound, outbound queue, test xa resource
      6. connection to the second server is halt at time when commit message of MDB resource is sent to artemis broker but the confirmation is not delivered back to TM
      7. commit of MDB as xa resource and outbound queue as resource fail - XAException.XA_RETRY is returned
      8. the test XAResource is committed
      9. recovery starts work and log shows that XAResourceRecord.commit is called at some point of time but the real commit on the XAResource is not done and transaction is rolled back at the end

      The expected behavior (and what I can observe for JTA as well) is that recovery process should commit the outbound connection resource (MDB resource should be committed just not confirmed back from artemis broker to TM).

              thjenkin@redhat.com Tom Jenkinson
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: