Databases Reference
In-Depth Information
9.5
Distributed Transaction Management
The purpose of distributed transaction management is to maintain the
ACID properties of global transactions, that is, transactions expressed with
respect to the global or external schemas of a DDB system. The local transac-
tion manager (LTM) at each site is still responsible for maintaining the
ACID properties of subtransactions of global transactions that are being exe-
cuted at that site, as well as of local transactions that are submitted directly to
the local DB. However, a global transaction manager (GTM) is also needed
to distribute requests to and coordinate the execution of the various LTMs
involved in the execution of each global transaction.
There are likely to be several GTMs in a DDB system, one at each site
to which global transactions can be submitted. Each GTM is responsible for
guaranteeing the ACID properties of transactions submitted to it for execu-
tion. To do that, a GTM must employ distributed versions of the concur-
rency control and recovery protocols used by centralized DBMSs for local
transaction management. We discuss these distributed protocols in this sec-
tion, but first we will briefly review the main aspects of concurrency control
and recovery in centralized DBMSs.
In a centralized DBMS, the concurrency control mechanism ensures
that transactions are interleaved in such a way that their net effect is equiva-
lent to a sequential execution in some order, that is, that transactions can
be serialized. This is the isolation part of the ACID properties listed in the
introduction to this chapter. If each transaction is individually consistent,
this also ensures the overall consistency of concurrently executing trans-
actions, that is, the consistency property. The three main approaches to
centralized concurrency control are locking, timestamping, and optimistic
concurrency control. We will be focusing on locking, because it is the
method most commonly used in commercial DBMSs, both centralized
and distributed.
Concurrency control is concerned with preserving the semantic integ-
rity of the DB in the face of concurrently executing transactions. In contrast,
the recovery mechanism ensures the physical integrity of the DB in the event
of a transaction aborting or a system failure occurring. It does that by logging
the changes made by each transaction on stable storage, such as disk or tape,
before the changes are applied to the actual data files. If a failure occurs, a
redo phase applies all the changes recorded in the log to the data files. That
brings the data files up to date and in particular ensures that the effects of
committed transactions are not lost. This is the durability part of the ACID
properties.
An
undo
phase
then
reverses
the
changes
performed
by
Search WWH ::




Custom Search