9-28 IBM Informix OnLine Database Server Administrator’s Guide
Two-Phase Commit and Automatic Recovery
Figure 9-7
Simple
illustration of
automatic
participant
recovery.
P1 Participant :
Returns message: “cannot commit.”
P3 Participant:
Queries coordinator about transaction status.
Coordinator:
Sends a “prepare” message to participants.
P3 Participant fails.
Start Protocol
End
Start Participant Recovery
After OnLine returns online,transaction waits for message from coordinatoruntil TXTIMEOUT elapses
tbinit forks database server process.
Coordinator:
Reports transaction status is unknown.
P3 Participant:
Interprets status as instruction to roll back.
Rolls back piece of work.
Removes transaction entry from shared-memory transaction table.
Releases shared-memory resources.
P2 and P3 Participants:
Return message: “can commit.”
Coordinator:
Receives “cannot commit” response.
Records decision to roll back.
C
P1 P2 P3
C
P3
C
P3