Product Environment 9-49
Two-Phase Commit and Logical Log Records
Figure 9-11
Writes of
logical log records
during a heuristic
rollback
All Participants:
Write log record: TABLOCKS.
Write and flush log record: PREPARE.
Send message: “commit ok.”
Coordinator:
Writes message in message log (-698).
Sends message to P1: “end-transaction.”
Coordinator:
Writes log record: BEGPREP.
Sends message: “precommit.”
P1 Participant:
Sends message: “Transaction heuristically rolled back.
Cannot commit.”
Coordinator:
Writes and flushes log record: COMMIT.
Sends message: “commit.”
Within P1 Participant’s Environment:
tbinit detects long-transaction condition rollback starts.
Writes log record: HEURTX.
Writes log record: ROLLBACK.
Message written in OnLine message log.
P1 Participant:
Writes log record: ENDTRANS.
Sends message: “transaction ended.”
Start
End Protocol
Coordinator:
Writes log record: ENDTRANS.
Returns error message to user: Error -698.
C
C
C
C
P1
P1
P2 P3
P1 P2 P3