Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Sequential flow of a two-phase commit in UDS-D for distribution via UDS-D and openUTM

&pagelevel(4)&pagelevel

First phase of the two-phase commit

  1. openUTM sends a PETA statement to UDS/SQL. The distribution component in the user task sends

    • a FINISH statement to all secondary subtransactions without an UPDATE flag and

    • the PETA statement to all secondary subtransactions with an UPDATE flag.

    The PETA statement causes a fail-safe log of the following information to be created in the RLOG file of the respective configuration:

    • all pages that were updated by the respective secondary subtransaction,

    • the roll-back information, and

    • the names of all configurations involved (in case a warm start is required).

    In the steps that follow, references to “secondary subtransactions” essentially mean “secondary subtransactions with an UPDATE flag”, since the remaining secondary subtransactions have already been terminated.

  2. The secondary subtransactions execute the PETA statement and report to the distribution component in the user task whether or not the PETA statement could be executed without errors.
  3. If the distribution component in the user task has not received a message from every secondary subtransaction, it checks whether the execution of the PETA statement was successful for all secondary subtransactions.

    Step 4a. or 4c. is then performed accordingly.

    If the distribution component in the user task has not received a message from all subtransactions before a time interval that depends on PP CHCKTIME expires, all subtransactions are instructed to terminate with FINISH WITH CANCEL.
    openUTM receives the return code "Transaction rolled back".
  4. 4a.

    If all subtransactions have executed the PETA statement successfully, the PETA statement is issued for the primary subtransaction as well. If this statement executes successfully, the entire DB transaction is placed in the PTC (prepared to commit) state; see the section “PTC state”. The PTC state is reported to openUTM, and control is handed over so that openUTM can initiate the second phase.
    If the PETA statement could not be executed successfully, step 4b. is performed.

    Second phase of the two-phase commit

    4b.

    All secondary subtransactions are instructed to terminate with FINISH WITH CANCEL. openUTM receives the return code "Transaction rolled back".

    4c.

    If all secondary subtransactions could not execute the PETA statement successfully, all subtransactions, including the primary subtransaction, are instructed to terminate by rolling back the updates (FINISH WITH CANCEL). openUTM receives the return code "Transaction rolled back".

  5. openUTM harmonizes with other applications how the transaction is to be terminated and causes UDS/SQL to commit or roll back the updates.

    The termination of individual subtransaction is controlled by the distribution component in the user task.