Product Environment 9-31
Heuristic Decisions: What and Why
The word heuristic refers to the independent nature of the action; that is, it
occurred at the participant OnLine independent of the two-phase commit
protocol, without the coordinator’s instruction or knowledge. The only event
that would cause tbinit to initiate a heuristic rollback is a long-transaction
condition. (Refer to page 2-159 for more details about a long-transaction
condition.)
If you, as administrator at the coordinator OnLine database server, execute
either tbmode -z (kill the coordinator process) or tbmode -Z (kill the global
transaction) after the coordinator issues its final “commit” decision, you are
removing all knowledge of the transaction from shared memory at the
coordinator OnLine server.
This action is not considered a heuristic decision; it is either acceptable or it
creates an error.
The action is acceptable any time that all participants are able to commit the
transaction without difficulty. In this case, your action to forcibly end the
transaction is actually superfluous. The indication that you executed tbmode
-Z only reaches the coordinator at the point in time when it is preparing to
terminate.
In practice, you would probably only consider executing tbmode -z or
tbmode -Z at the coordinator OnLine if you were attempting to hasten the
conclusion of a global transaction that has remained open for an unusually
long period. In this scenario, the source of the problem is probably a failure
at some participant OnLine server: the coordinator has not received acknowl-
edgment that the participant committed its piece of work and the coordinator
is attempting to establish communication with the participant to investigate.
If you execute either tbmode -z or tbmode -Z while the coordinator is
actively trying to reestablish communication, the coordinator database
server process obeys your instruction to die, but not before it writes an error
into the OnLine message log: error -716. The action is considered an error
because the two-phase commit protocol was forcibly broken, preventing the
coordinator from determining whether or not the database is consistent.
Important: The action of killing a global transaction at a coordinator OnLine is not
considered a heuristic decision but it can result in an inconsistent database. You are
strongly advised to avoid this action. (Refer to page 9-43 for an explanation of how
this action can lead to an inconsistent database.)