Uploaded image for project: 'WildFly Transaction Client'
  1. WildFly Transaction Client
  2. WFTC-67

WFLY transaction client does not provide information for transaction recovery in case of failure after prepare

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.1.4.Final
    • None
    • None
    • Hide

      The testcase looks like

      • having a transaction with two resources, one is the remote EJB XAResource over WFTC, second is a database
      • business logic makes a call through the WFTC and inserts data to database
      • transaction manager runs 2PC
      • prepare is called on WFTC XAResource and on database, but during the prepare call to database the app server crashes (JVM halt)
      • the Narayana transaction manager for JTA saves information to objects store only after whole prepare phase finishes (after all participants finishes with prepare)
      • after restart the transaction recovery manager should roll-back prepared WFTC XAResource. But as the WFTC removes information about resource immediatelly after prepare call ends (https://github.com/wildfly/wildfly-transaction-client/blob/1.1.3.Final/src/main/java/org/wildfly/transaction/client/SubordinateXAResource.java#L155) the recover manager has no knowledge about the need of rollbacking and resources behind the WFTC remote call stays locked forever

      (there will be a testcase in EAP QE crashrec testsuite running this scenario under test case TxProgrammaticPropagationJMSCrashRecoveryTestCase)

      Show
      The testcase looks like having a transaction with two resources, one is the remote EJB XAResource over WFTC, second is a database business logic makes a call through the WFTC and inserts data to database transaction manager runs 2PC prepare is called on WFTC XAResource and on database, but during the prepare call to database the app server crashes (JVM halt) the Narayana transaction manager for JTA saves information to objects store only after whole prepare phase finishes (after all participants finishes with prepare) after restart the transaction recovery manager should roll-back prepared WFTC XAResource. But as the WFTC removes information about resource immediatelly after prepare call ends ( https://github.com/wildfly/wildfly-transaction-client/blob/1.1.3.Final/src/main/java/org/wildfly/transaction/client/SubordinateXAResource.java#L155 ) the recover manager has no knowledge about the need of rollbacking and resources behind the WFTC remote call stays locked forever (there will be a testcase in EAP QE crashrec testsuite running this scenario under test case TxProgrammaticPropagationJMSCrashRecoveryTestCase )

      WildFly Transaction Client provides data for recovery in case of JVM failure or other error. But these data are removed too early for cases when Narayana transaction recovery manager runs bottom-up orphan detection which searches for in-doubt participants which should be rolled-back.
      The data are removed immediately after the prepare is finished. The recovery manager could still demand these data until the time the whole prepare phase of 2PC is finished.

      If the recovery manager does not get any information from XAResource.recovery the resource (EJB remote subordinate XAResource) could never be cleaned-up with rollback call.

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

                Created:
                Updated:
                Resolved: