
9-32 IBM Informix OnLine Database Server Administrator’s Guide
Heuristic Decisions: What and Why
Once a heuristic rollback or end-transaction occurs, you have started down
theroadtowardmanualrecovery,a complex and time-consumingprocess.It
isimportantforyoutofullyunderstandheuristicdecisions,asthatisthebest
means for avoiding them. You should always be wary of executing
tbmode -z or tbmode -Z within the context of two-phase commit.
Figure 9-8on page 9-33and Figure 9-9 onpage 9-35 illustratethe key charac-
teristicsofaheuristicrollbackandaheuristicend-transaction,respectively.A
general discussion of a heuristic rollback begins on page 9-32. A more
detailed discussion, including why the rollback might occur and the
messages that are generated, begins on page 9-36. A general discussion of a
heuristic end-transaction begins on page 9-32. A more detailed discussion,
including why you might take this action and its consequences, begins on
page 9-40.
Two points about the heuristic rollback bear emphasis.
The first point is that a heuristic rollback does not end or close the trans-
action.Ifthepieceofworkiscreatingalong-transactioncondition,theaction
of rolling back the piece of work (whether done by tbinit or by you, the
administrator), does not solve the problem. This is a key difference between
thetwo-phasecommitprotocolandthestandardsituationinasingleOnLine
environment. The transaction remains open, and the logical log records
associatedwiththetransactionremainopen.Logicallogfilescannotbefreed.
The transaction ends only after the coordinator receives information about
the rollback from the participant, and, in response, directs the participant to
end the transaction. This additional instruction from the coordinator
removes the entry from the participant’s transaction table, ends the piece of
work,andenablesthelogicallogrecordsassociatedwiththe piece ofworkto
be closed.The complete protocol is illustrated in Figure 9-11 on page 9-49.
Thesecondpointisthataheuristicrollbackleavesthetransactionentryinthe
participant’sshared-memorytransactiontable. This is another way of saying
thatthetransactionremainsopenoractive.Eventually,whenthecoordinator
investigates why the participant OnLinedid not acknowledgethat the piece
of work committed, the entry in the transaction table is interpreted by the
coordinatorasevidenceofaheuristicrollback.Asmentionedintheprevious
paragraph,thecoordinatorrespondstotheheuristicrollbackbydirectingthe
participant to end the transaction.
Comentarios a estos manuales