Information Technology Reference
In-Depth Information
to the log. When the server receives the log record containing a copy of a client
modified-page table, it maps each R EC -LSN value there to a corresponding R EC -A DDR
value and appends the modified-page-table contents with the mapping to the server's
log.
As already noted in the discussion on callback processing (Algorithm 14.3 ),
when the server believes that a client c has crashed, all information about pages
cached at c is deleted from the cached-page table, so that for every page cached for
writing at c the server version becomes the current version of that page. The server
then performs the ARIES algorithm on behalf of the failed client c. The algorithm is
performed selectively, observing only log records originating from c.
In the analysis pass, the active-transaction and modified-page tables of the
crashed client are reconstructed by a forward scan of the log at the server, starting
from the most recent checkpoint of the client found logged at the server, observing
only log records written by the client. At the end of the analysis pass a log-address
value R EDO -A DDR is determined, which is the minimum of the R EC -A DDR values
corresponding to the R EC -LSN values in the reconstructed modified-page table of the
client.
The redo pass begins at R EDO -A DDR . The only updates that may have to be redone
are updates by the failed client on pages whose current versions were cached there
for writing at the time of the client crash. Note that if such a page were earlier cached
for writing at some other client, then the server version of the page must contain the
updates by that client, because the updated page was shipped to the server and from
there to the client that then failed.
In the undo pass, the transactions registered as forward-rolling in the client's
reconstructed active-transaction table are aborted and rolled back, and the rollback
of the backward-rolling transactions is completed, performing all undo actions on
the current versions of pages, some of which may need to be called back from other
clients.
Example 14.3 Assume that in Example 14.2 , one of the clients crashes while the
transaction running there is still active. First consider the case that the crashed client
is c 1 . After noticing that c 1 is down, the server begins executing the ARIES algorithm
on behalf of c 1 .
In the analysis pass, the active-transaction and modified-page tables of c 1
are reconstructed, observing only log records written at c 1 . At the end of the
pass, the active-transaction table contains the forward-rolling transaction T 1 with
U NDO -N EXT -LSN D n 2 , and the modified-page table contains p with R EC -LSN D n 2 .
The redo pass thus begins at R EDO -A DDR D R EC -A DDR .p/ D the log-record
address corresponding to R EC -LSN .p/ D n 2 . In the redo pass, since R EC -LSN .p/
is less than or equal to n 2 , the current version of page p must be fixed and write-
latched.
From the cached-page table, the server finds out that page p is currently cached
with write privilege at client c 2 . Thus the server sends the request callback-
page .p; “write”/ to client c 2 , which responds to the request by fixing and write-
latching p, making a list L 0 of log records not yet shipped to the server (thus
Search WWH ::




Custom Search