IBM 000-8697 User Manual
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.”
Returns message: “cannot commit.”
P3 Participant:
Queries coordinator about transaction status.
Queries coordinator about transaction status.
Coordinator:
Sends a “prepare” message to participants.
Sends a “prepare” message to participants.
P3 Participant fails.
Start Protocol
End
Start Participant Recovery
After OnLine returns online, transaction waits for message from coordinator until TXTIMEOUT elapses
tbinit forks database server process.
Coordinator:
Reports transaction status is unknown.
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.
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.”
Return message: “can commit.”
Coordinator:
Receives “cannot commit” response.
Records decision to roll back.
Receives “cannot commit” response.
Records decision to roll back.
C
P1
P2
P3
C
P3
C
P3