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

Transaction reported to be rolled back, although committed with one participant

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 4.17.4
    • Transaction Core
    • None

    Description

      While testing recovery and transaction failures we came across
      two related issues, the test scenario is almost the same, I'll file the second issue shortly and update this ticket accordingly.

      Scenario:
      2 enlisted XAResources (one for each database used by the test),
      The prepare phase is successful.
      We crash the first database server during the XAResource.commit invocation,
      after it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
      The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
      By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
      But now things go awry:
      1. There is a XAResource.rollback() issued to the second XAResource.
      2. The client receives a EJBTransactionRolledbackException, although
      one branch has been completed.

      Note, that our database does not support heuristical completion of a branch at all, i.e. there should be no Heuristic* exception be thrown either.

      The correct behavior is, to report the transaction as success to the client, commit all branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.

      Attachments

        Activity

          People

            thjenkin@redhat.com Tom Jenkinson
            cvk_jira Christian von Kutzleben (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: