A subtransaction is said to be in the PTC (prepared to commit) state if it has successfully executed the PETA statement, but has not yet received an instruction to terminate. In this state, no decision has been made as to whether the entire transaction, i.e. including the subtransaction itself, will be terminated with FINISH or FINISH WITH CANCEL.
In the case of a distribution via UDS-D, only secondary subtransactions with an UPDATE flag enter the PTC state. For a distribution via UDS-D and openUTM, the primary subtransaction may also enter the PTC state if it or at least one of its secondary subtransactions has the UPDATE flag.
The following diagrams illustrate the actions of the individual subtransactions and the PTC state
when the two-phase commit leads to FINISH for a transaction distributed via UDS-D
(see figure 18).
when the two-phase commit leads to a rollback for a transaction distributed via UDS-D
(see figure 19).
when the two-phase commit leads to FINISH for a transaction distributed via UDS-D and openUTM
(see figure 20).
when the two-phase commit leads to a rollback for a transaction distributed via UDS-D and openUTM
(see figure 21).
The following abbreviations are used in the figures below: | |
PTT: | Primary subtransaction |
STT: | Secondary subtransaction |
Figure 18: Chronological sequence of a two-phase commit with FINISH using UDS-D
Figure 19: Chronological sequence of an unsuccessful two-phase commit using UDS-D
Figure 20: Chronological sequence of a two-phase commit with FINISH for distribution via UDS-D and openUTM
Figure 21: Chronological sequence of an unsuccessful two-phase commit for distribution via UDS-D and openUTM