9-34 IBM Informix OnLine Database Server Administrator’s Guide
Heuristic Decisions: What and Why
In the first case, when you execute tbmode -Z to end a global transaction at
the coordinator OnLine database server, you interfere with participant recovery
in the following way. If a participating OnLine database server was down at
the time that the coordinator issued its decision to commit, participant
recovery eventually queries the coordinator for information. Because the
transaction entry has been removed from shared memory at the coordinator
OnLine server, the coordinator is unable to provide information about the
transaction. The participant interprets the lack of information as a evidence
that the coordinator issued a decision to rollback the transaction. The partic-
ipant rolls back its piece of work even though all other participating OnLine
servers committed theirs. This is one way in which an inconsistent database
can develop.
In the second case, when you execute tbmode -Z to end a piece of work that
is in progress at a participant OnLine database server, you interfere with the
protocol in the following way. If the coordinator issues a decision to commit,
it waits for acknowledgment from all participants that the commit occurred.
When the coordinator OnLine does not receive an acknowledgment from the
participant OnLine server where the tbmode -Z occurred, it investigates the
situation. The coordinator queries the participant OnLine server, which no
longer has information about the transaction. The lack of a transaction table
entry at the participant OnLine server is taken as evidence that the trans-
action committed. The coordinator OnLine assumes that the
acknowledgment message was sent from the participant, but somehow it
was not received. Because the coordinator does not know that this participant’s
piece of work did not commit, it does not generate messages indicating that
the global transaction was inconsistently implemented. Only the adminis-
trator who executed the tbmode -Z command is aware of the inconsistent
implementation. (The complete protocol is illustrated in Figure 9-12 on
page 9-50.)
Thus, whenever you initiate a heuristic end-transaction by executing
tbmode -Z, you remove critical information required by OnLine to support
the two-phase commit protocol and its automatic recovery features. If you
execute tbmode -Z, it becomes your responsibility to determine whether
your networked database system is consistent. Refer to page 9-51 for more
details about how to determine database consistency.