IBM 000-8697 Server User Manual


 
9-20 IBM Informix OnLine Database Server Administrator’s Guide
IBM Informix STAR and Two-Phase Commit Protocol
During the postdecision phase the coordinator directs each database server to
either commit the changes or roll back the transaction. If the coordinator
directs the participants to commit the transaction, it waits to receive acknowl-
edgments from each before ending the global transaction. If the coordinator
directs the participants to roll back the transaction, no acknowledgments are
expected from the participants.
Informix has implemented the two-phase commit protocol with the
presumed-abort optimization, which allows faster processing because some of
the logical log records written during the protocol can be buffered. The impli-
cation of the optimization for automatic participant recovery is described as
part of the discussion of automatic recovery that begins on page 9-23. The
specific discussion of presumed-abort optimization begins on page 9-29.
Protocol Components
The two-phase commit protocol relies on two kinds of communication
messages and logical log records:
Messages
Messages must pass between the coordinator and each participant to
ensure transaction atomicity (that is, all-or-nothing changes). Mes-
sages from the coordinator include a transaction identification
number and instructions (such as “prepare to commit,” “commit,” or
“roll back”). Messages from each participant include the transaction
status and reports of action taken (such as “can commit,” “cannot
commit,” “committed,” or “rolled back”).
Logical log records
Logical log records of the transaction are kept on stable storage (disk
or tape) to ensure data integrity and consistency, even if a failure
occurs at a participating OnLine database server (participant or coor-
dinator). For more details about automatic two-phase commit
recovery in the event of failure, refer to page 9-23. For more details
about the logical log records that are written during the two-phase
commit protocol, refer to page 9-44.