Product Environment 9-31
Heuristic Decisions: What and Why
The wordheuristic 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 causetbinit to initiate a heuristic rollback is a long-transaction
condition. (Refer topage 2-159 for more details about a long-transaction
condition.)
If you, as administrator at the coordinator OnLine database server, execute
eithertbmode -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.
Theaction is acceptable any time that all participants are able to commit the
transaction without difficulty. In this case, your action to forcibly end the
transactionis 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 executingtbmode -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
atsome participant OnLine server: the coordinator has not received acknowl-
edgmentthat the participant committed its piece of work and the coordinator
isattempting to establish communication with the participant to investigate.
If you execute either tbmode -z ortbmode -Z while the coordinator is
actively trying to reestablish communication, the coordinator database
serverprocess 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
becausethe two-phase commit protocol was forcibly broken, preventing the
coordinator from determining whether or not the database is consistent.
Important: Theaction of killing a global transaction at a coordinator OnLine is not
considereda heuristic decision but it can result in an inconsistent database. You are
strongly advised to avoid this action. (Refer topage 9-43 for an explanation of how
this action can lead to an inconsistent database.)