Information Technology Reference
In-Depth Information
109: h T 1 ; prepare ;s 0 ;T 0 ; f s 2 gi
110: h S; B i
111: h S; W; p 3 ;x 3 ; u 3 ; v 3 ; 110 i
112: h S; add-participant ;s 1 i
113: h S; add-participant ;s 2 i
114: h S; prepare i
Restart recovery is performed using the ARIES algorithm. What are the contents
of the active-transaction table reconstructed in the analysis pass? What actions are
performed in the redo pass? What actions are performed in the undo pass? What log
records are written?
13.4 A practical variant of the two-phase commit protocol makes use of an
assumption called presumed abort . With this protocol, when a participant needs
to inquire the fate of an in-doubt transaction T of its coordinator, the coordinator
can respond to the inquiry by consulting its active-transaction table only: the
nonexistence of the transaction record of T in the active-transaction table implies
that T has aborted. Make necessary changes in the procedures presented in this
chapter so as to implement this protocol. Hint: Ensure that the coordinator deletes
the transaction record of T only if it aborts T or if no inquiry of the fate of T is to
be expected.
13.5 Another variant of the two-phase commit protocol includes a further round
of message exchange after the participants have committed their subtransactions:
each participant is required to send an acknowledgement back to the coordinator
after committing its subtransaction, and when the coordinator has received such
an acknowledgement from each participant, it writes an additional log record
representing the final termination of the protocol. What advantage can be gained
by this variant of the protocol?
13.6 Work out the idea of detecting a cycle in the union graph of the local wait-for
graphs outlined in Sect. 13.6 .
13.7 A distributed transaction defined in this chapter is composed of a parent
transaction with a number of child transactions. In a more general model, the child
transactions can be parents for their own children, so that an entire distributed
transaction consists of a tree of local transactions. For each subtransaction T i at
a non-leaf node in the tree, the server executing T i coordinates the parent T i and
its children, that is, the transactions at the child nodes of T i . Such a transaction T i
commits only if all its children commit. Thus, the root of the tree commits only if
all the transactions in the tree commit.
Discuss applications in which this kind of multi-level distributed transactions
might be useful. Generalize the two-phase commit protocol to work with this
generalized model of transactions.
13.8 An atomic commit protocol can be used to coordinate a distributed transaction
only if each participating server allows its transactions to participate. In many cases,
a server may very well allow one of its stored procedures to be executed as a local
Search WWH ::




Custom Search