Information Technology Reference
In-Depth Information
Among the log records shipped in Step 5, there are no log records for updates on
page p if the page was not updated after the commit of T . In this case, the modified-
page table reconstructed in the analysis pass of server recovery does not contain an
entry for p. Thus the R EDO -A DDR value determined may be greater than a 2 , the log-
record address for the update by T on p. This in turn means that in the redo pass,
the update logged at a 2 is not redone but is lost.
t
A simple solution to the pitfall above would be to record an unmodified page as
a modified page in the server's modified-page table immediately after shipping the
page to a client for updating. A downside of this solution is that the R EC -A DDR value
for the page may then be left too conservative, leading to unnecessary work to be
done in the redo pass.
A better solution is to include into a server's checkpoint copies of the local
modified-page tables of all clients. When starting a checkpoint, the server requests
all clients to send a copy of their modified-page tables. After receiving these copies,
the server merges them with its own table and writes the merged table to its log,
mapping R EC -LSN values to R EC -A DDR values as explained above. In this way the
analysis pass can determine a sufficiently early R EDO -A DDR valuesoastogetall
logged updates to be redone on the pages buffered at the server.
Example 14.5 The pitfall shown in Example 14.4 is avoided, if the server, when
taking the checkpoint, requests client c to ship a copy of its modified-page table,
because that table must contain an entry for p with R EC -LSN D n 2 . An entry for p
will thus also appear in the merged modified-page table included in the checkpoint.
t
After the server has recovered from the failure, it must perform recovery on
behalf of those clients that have crashed during the time the server was down.
Moreover, the server must request each client that is up and running to send
information about pages they currently cache, for the reconstruction of the cached-
page table. The clients must resend to the server those log records whose receipt
was not acknowledged by the server due to the failure.
14.9
Concurrency Control
The concurrency-control protocols presented earlier can all be adapted to controlling
the concurrency of transactions in a page-server system. For the management of
locks held by its transactions, each client c maintains a local lock table .Thelock-
table entries are, as before, tuples .T;x;m;d/,wherex is the lock name, m is the
lock mode, d is the duration, and T is the identifier of the transaction of client c that
is the owner of the lock.
For detecting incompatibility of locks across different clients, a global lock table
is maintained at the server. In this table, locks are recorded in the name of the client
whose transaction holds the lock. Thus, the lock-table entries in the global lock
Search WWH ::




Custom Search