Commitment definition for two-phase commit: Not wait for outcome

When a communication or system failure occurs during a commit operation so that resynchronization is required, the default is to wait until the resynchronization is finished before the commit operation completes.

Note: The Not wait for outcome option does not apply if you are using a DRDA® distributed unit of work over TCP/IP connection. DRDA distributed unit of work over TCP/IP connections never waits for outcome.

Consider changing this behavior if the following conditions are true:

After you start commitment control, you can use the Change Commitment Options (QTNCHGCO) API to specify that the commitment definition does not wait for the outcome of resynchronization. If you specify N (No) for the Wait for outcome option, the system uses a database server job (QDBSRVnn) to handle resynchronization asynchronously.

Note: These database server jobs are started during the IPL process. If you change the options for commitment control, this has no effect on the number of jobs that the system starts.

This topic only refers to two values for the resolved Wait for outcome option, Y (Yes) and N (No). There are actually two more values that you can specify, L (Yes or Inherit from Initiator) and U (No or Inherit from Initiator). When you use these values, the actual value used during each commit operation is resolved to Yes or No by the system. The QTNCHGCO (Change Commitment Options) API topic has more details about these values.

Note: The initiator's value can only be inherited by an agent if both the initiator and the agent support presumed abort.

The wait for outcome (WFO) option does not affect normal, error-free commit processing. If an error occurs, the WFO option determines whether the application waits for resynchronization or not, with the following conditions:

Wait for outcome value: Yes

In the following figure, the commitment definition for the initiator (I) uses the default value of Y (Yes) for the Wait for outcome option. When communications between TM-I and TM-A is lost, both application A and application I wait until the transaction is resynchronized.


Flow of wait for outcome-Yes

Wait for outcome value: No

In the following figure, the commitment definition for the initiator has the resolved WFO set to N (No). TM-A meets condition 3 in the preceding list, while TM-I meets condition 4. Control is returned to application I after one attempt to resynchronize with TM-A. A database server job attempts to resynchronize. Application I never receives the return indicator when the commit request has completed successfully. Control is not returned to the agent application (A) until after communications is reestablished. This depends on the timing of the failure. In this case, the communications failure occurs before the commit message is received from the initiator, leaving TM-A in doubt as to whether to commit or rollback. When the transaction manager is in doubt, it retains control until the resynchronization is completed, regardless of the resolved WFO value at that system.

If you want the applications at all systems to continue before resynchronization completes, you must either change the resolved WFO option to N (No) on all systems, or set the initiator to N and the rest of the systems to U (No or Inherit from Initiator). But remember that the resolved WFO option is ignored when the transaction manager is in doubt as to whether to commit or rollback, and always waits until resynchronization completes before returning control.


Flow of wait for outcome-No

When a connection is made to a remote relational database, and no protected conversations have already been started, the system implicitly changes the Wait for outcome value to N. The reason for this is that the performance of commit operations is improved when the Wait for outcome value is N and the remote system supports presumed abort. This implicit change of the Wait for outcome value is only performed for DRDA and DDM applications. APPC applications use the default Wait for outcome value of Y unless they call the QTNCHGCO API to change it.

Related concepts
States of the transaction for two-phase commitment control
Commitment control errors
Related reference
Change Commitment Options (QTNCHGCO) API