
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
directsthe participantstocommitthetransaction,itwaitstoreceiveacknowl-
edgments from each before ending the global transaction. If the coordinator
directsthe participants to roll backthe transaction, noacknowledgments 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
thelogicallogrecordswrittenduringtheprotocolcanbebuffered.Theimpli-
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
Messagesmustpassbetweenthecoordinatorandeachparticipantto
ensure transaction atomicity (that is, all-or-nothing changes). Mes-
sages from the coordinator include a transaction identification
numberandinstructions(suchas“preparetocommit,”“commit,”or
“rollback”). Messagesfrom each participant include the transaction
status and reports of action taken (such as “can commit,” “cannot
commit,” “committed,” or “rolled back”).
■ Logical log records
Logicallog recordsofthetransactionarekeptonstable storage (disk
or tape) to ensure data integrity and consistency, even if a failure
occursataparticipatingOnLinedatabaseserver(participantorcoor-
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.
Komentarze do niniejszej Instrukcji