Product Environment 9-37
Heuristic Rollback
It is important to recognize that this rollback does not close the transaction as it
wouldin a single OnLine environment. Under two-phase commit, the logical log
files that contain records associated with the piece of work are considered
openuntil an ENDTRANS logical log record is written. (Refer to page 9-44 for
more details about the logical log records during the two-phase commit
protocol.)
Itis quite possible that the logical log will continue to fill until the exclusive
high-watermark is reached (LTXEHWM). If this happens, all database server
processes are suspended except those that are currently rolling back or
currently committing. In the two-phase commit scenario, the open trans-
actionprevents you from backing up the logical log files and freeing space in
the logical log. Under these specific circumstances, the logical log can fill
completely.Ifthis happens, OnLine shuts down and you must perform a data
restore.
Condition 2: You Execute tbmode -z
You, as administrator, can decide to initiate a heuristic rollback of a precom-
mittedpiece of work by executing tbmode -z. You might make this decision
becauseyou want to free the resources that are held by the piece of work. (If
youkill the database server process by executing tbmode -z, you free all locks
and shared-memory resources that are held by the database server process
eventhough you do not end the transaction.) The likely consequence of this
actionis that the coordinator will eventually contact the participant, learn of
the heuristic rollback, and direct the participant to end the transaction
withoutan interruption in processing. However, you are strongly advised to
considerthe other, less likely consequence (manual recovery) before you take
this action.
When a Heuristic Rollback Occurs
When a heuristic rollback occurs at a participant OnLine, a record is placed
inthe OnLine logical log (type HEURTX) where the rollback occurred. Locks
and resources held by the transaction are freed. Thetbinit daemon writes a
message in the OnLine message log indicating that a long-transaction
condition and rollback occurred. (Refer topage 8-29 for a complete
description of the message.)
Transaction Completed Abnormally (rollback):
tx=address flags=0xnn