Information Technology Reference
In-Depth Information
including that with LSN m 2 ), shipping a copy of p, the list L 0 and R EC -LSN .p/ D m 2
to the server, waiting for an acknowledgement, and purging page p from the cache.
The server then replaces the server version of p by the received current version
of p, appends the log records in L 0 to the log, updating the LSN -to-address mapping,
marks p as a modified page in the buffer control block, updates the modified-page
table, and acknowledges the receipt of the page and the log records, records p as
no longer cached at c 2 , examines P AGE -LSN .p/ only to find out that P AGE -LSN .p/ D
m 2 >n 2 , so that the action WŒx 1 ; u 1 ; v 1 must not be redone. This completes the
redo pass.
In the undo pass, the active transaction T 1 is aborted and rolled back at the server,
resulting in performing the undo action W 1 Œx 1 ; u 1 ; v 1 on the page p buffered at
the server and in writing the following log records:
a 3 W n 3 Wh c 1 ;T 1 ;A i
a 4 W n 4 Wh c 1 ;T 1 ;W 1 ;p;x 1 ; u 1 ; v 1 ;n 1 i
a 5 W n 5 Wh c 1 ;T 1 ;C i
where n 3 >n 2 and n 5 >n 4 > max f n 3 ;m 2 g and a 3 , a 4 ,anda 5 are the addresses of
the log records in the server's log.
Then consider the case that the crashed client is c 2 instead of c 1 . After noticing
that c 2 is down, the server discards from the cached-page table the information about
page p being cached at c 2 , thus making the server version of p as the current version,
and begins executing the ARIES algorithm on behalf of c 2 .
In the analysis pass, the active-transaction and modified-page tables of c 2 are
reconstructed, observing only log records written at c 2 . As no log records from c 2
have not yet been shipped to the server, the reconstructed tables are those written
at the last checkpoint, if any. In the case that the reconstructed tables are empty,
nothing is done in the redo and undo passes.
t
When a crashed client is up and running again, no actions need be done for
database recovery. After initializing its main-memory structures and starting a client
database process, it is ready to process new transactions.
14.8
Recovery from a Server Failure
For recovery from its own failures, the server takes periodically checkpoints
of its own. At such a checkpoint, the contents of the server's modified-page
table are written to the server's log. The modified-page table contains an entry
.p; R EC -A DDR .p// for a page with page-id p if the server version of page p is
different from the disk version of p. The entry is inserted when an updated copy
of p is shipped from a client for the first time since fetching p from disk (or when
the server itself is the first updater).
According to the general logic of the ARIES algorithm, the recovery from a server
failure is based on the last completely taken checkpoint. In the analysis pass, the
Search WWH ::




Custom Search