9-40 IBM Informix OnLine Database Server Administrator’s Guide
Heuristic End-Transaction
Heuristic End-Transaction
Thereis only one, rare situation in which it is reasonable for you to decide to
executethe tbmode -Z option to initiate a heuristic end-transaction: a piece of
work that has been heuristically rolled back remains open. This open transaction
prevents your logical log files from becoming free. As a result, the logical log is
dangerously close to full.
If you require a general introduction to the concept of a heuristic end-trans-
action within the two-phase commit protocol, refer topage 9-30 for a
summary discussion. This section provides additional details. Turn to
Figure9-12 on page 9-50 to see an illustration of the two-phase commit
protocol for a piece of work that is heuristically ended.
In general, the coordinator issues its commit-or-rollback decision within a
reasonable period of time. However, if the coordinator fails and does not
return online to end a transaction that was heuristically rolled back at your
participant OnLine, you might find yourself facing a serious problem.
The problem scenario begins something like this:
1. Thedatabase server process executing a piece of work on behalf of a
global transaction has sent a “can commit” response to the
coordinator.
2. The piece of work is waiting for instructions from thecoordinator.
3. While the piece of work is waiting, the logical log fills past the long-
transaction high-water mark.
4. Thepiece of work that is waiting for instructions is the source of the
long transaction. Thetbinit daemon directs the executing database
server process to roll back the piece of work. This is a heuristic
rollback.
5. The participant continues to wait for the coordinator to direct it to
end the transaction. The transaction remains open. The logical log
continues to fill.
Ifthe coordinator contacts the participant and directs it to end the transaction
in a reasonable period of time, no problem develops. The serious problem
occursif the heuristic rollback occurs at a participant OnLine and thereafter the
coordinatorfails, preventing the coordinator from directing the participant to
end the transaction.