Scenario: Making a heuristic decision about whether to commit or abort an indoubt thread

An organization might need to make a heuristic decision about whether to commit or abort an indoubt thread.

Symptoms

In this scenario, an indoubt thread at Los Angeles (LA) holds database resources that are needed by other applications. The organization makes a heuristic decision about whether to commit or abort an indoubt thread.

Many symptoms are possible, including:

  • Message DSNL405 to indicate a thread in the indoubt state
  • A DISPLAY THREAD report of active threads showing a larger-than-normal number of threads
  • A DISPLAY THREAD report of indoubt threads continuing to show the same thread
  • A DISPLAY DATABASE LOCKS report that shows a large number of threads that are waiting for the locks that are held by the indoubt thread
  • Some threads terminating due to timeout
  • IMS and CICS® transactions not completing

Environment

The following figure illustrates the environment for this scenario.

Figure 1. Resolution of indoubt threads. Scenarios for resolving problems with indoubt threads contains a detailed description of the scenario depicted in this figure.
Begin figure description. This figure is a flowchart that depicts threads between four systems that are located at three different locations. End figure description.

Resolving the problem

Database administrator response: Determine whether to commit or abort the indoubt thread. First, determine the name of the commit coordinator for the indoubt thread. This name matches the location name of the Db2 subsystem at SEA, and it is included in the Db2 indoubt thread DISPLAY THREAD report at LA. Then, have an authorized person at SEA perform one of the following actions:
  • If the coordinator Db2 subsystem is active, or if it can be started, request a DISPLAY THREAD report for indoubt threads, specifying the LUWID of the thread. (Remember that the token that is used at LA is different than the token that is used at SEA). If no report entry exists for the LUWID, the proper action is to abort. If a report entry for the LUWID exists, it shows the proper action to take.
  • If the coordinator Db2 subsystem is not active and cannot be started, and if statistics class 4 was active when Db2 was active, search the SEA SMF data for an IFCID 209 event entry that contains the indoubt LUWID. This entry indicates whether the commit decision was commit or abort.
  • If statistics class 4 is not available, run the DSN1LOGP utility, and request a summary report. The volume of log data that is to be searched can be restricted if you can determine the approximate SEA log RBA value that was in effect at the time of the communication failure. A DSN1LOGP entry in the summary report for the indoubt LUWID indicates whether the decision was commit or abort.
After determining the correct action to take, issue the RECOVER INDOUBT command at the LA Db2 subsystem, specifying the LUWID and the correct action.
System action:

Issuing the RECOVER INDOUBT command at LA results in committing or aborting the indoubt thread. Locks are released. The thread does not disappear from the indoubt thread display until resolution with SEA is completed. The RECOVER INDOUBT report shows that the thread is either committed or aborted by heuristic decision. An IFCID 203 trace record is written, recording the heuristic action.