9-26 IBM Informix OnLine Database Server Administrator’s Guide
Two-Phase Commit and Automatic Recovery
Participant Recovery
Participant recovery occurs whenever a database server process acting as
participant precommits a piece of work but is terminated before the two-
phase commit protocol can be completed. The goal of participant recovery is
to complete the two-phase commit protocol according to the decision
reached by the coordinating OnLine.
During participant recovery, the piece of work waits for direction that the
work should be committed. If the coordinator is able, it spawns (through
sqlexecd) a new participant database server process to replace the one that
was terminated. The intent is for the coordinator and the new participant
process to complete the two-phase commit protocol.
However, the piece of work only waits a limited amount of time for the
coordinator to reestablish the protocol. This waiting period is specified as
TXTIMEOUT. (Refer to page 9-57.)
If the waiting period elapses before the coordinator has been able to spawn a
new participant, the tbinit process at the participant OnLine spawns a new
participant database server process. It is the task of this tbinit-spawned
server process to determine the transaction status and complete the protocol.
Figure 9-7 illustrates participant recovery.
Participant failure can occur as a result of either a system failure or the
isolated failure of the participant database server process. If a system failure
occurred, the administrator reinitializes shared memory and restarts the
sqlexecd process. (Refer to page 9-23.) Otherwise, participant recovery
occurs as part of OnLine processing.
As part of normal processing, the tbinit process at the participant OnLine
detects first that a two-phase commit protocol was underway, second that a
piece of work had been prepared to commit and third that the participant
database server process that owned the transaction was terminated
prematurely.
Nothing happens yet. The transaction waits to be contacted by the coordi-
nator. If the coordinator’s final decision is to commit the piece of work, the
coordinator attempts to contact the participant.