The current state of the unit of work (LUW). A commitment definition is established at each location that is part of the transaction program network. For each commitment definition, the system keeps track of the start of its current LUW and previous LUW. The system uses the state to decide whether to commit or rollback if an LUW is interrupted. If multiple locations are participating in an LUW, the states of the LUWs at each location may be compared to determine the correct action (commit or rollback). This process of communicating between locations to determine the correct action is called resynchronization.
Possible values are:
Reset: From the commitment boundary until a program issues a request to commit or rollback. Resynchronization is not needed. If interrupted, pending changes are rolled back.
Prepare in progress: The initiator has started the prepare wave. All locations have not yet voted. Resynchronization may be necessary. If interrupted, pending changes are rolled back.
Prepared: This location and all locations further down in the transaction program network have voted to commit. This location has not yet received notification from the initiator to commit. Resynchronization is required. If interrupted, any action taken depends on the results of the resynchronization process.
Last agent pending: If a last agent is selected, this state occurs at the initiator between the Prepare in progress state and the commit in progress state. The initiator has instructed the last agent to commit and has not yet received a response. Resynchronization is required. If interrupted, any action taken depends on the results of the resynchronization process.
Commit in progress: All locations have voted to commit. The initiator has started the committed wave. Resynchronization is required. If interrupted, pending changes are committed. Resynchronization is performed to ensure that all locations have committed. If an heuristic rollback is reported by another location, an error is reported.
Committed: All agents have committed and returned a reply to this node. Resynchronization may be necessary. If interrupted, no action is taken.
Vote read-only: This agent responded to the prepare wave by indicating that it has no pending changes. If the vote-read-only state is permitted, this agent is not included in the committed wave. Resynchronization may be necessary. If interrupted, no action is taken.
Rollback required: One of the following occurred:
- An agent issued a rollback request before the commit operation.
- A transaction failure has occurred.
- The QTNRBRQD API was used to place the LUW in a rollback required state.
The transaction program is not allowed to perform any additional changes under commitment control. Resynchronization may be necessary. If interrupted, pending changes are rolled back.
Rollback in progress: All locations have voted to rollback. The initiator has started the rollback wave. Resynchronization is required. If interrupted, pending changes are rolled back. Resynchronization is performed to ensure that all locations have rolled back.