Information Technology Reference
In-Depth Information
must also have the same contents. The current version of the physical database is
the set of current versions of the pages of the database, and the current version of
the logical database is the set of tuples in the current versions of the data pages.
14.4
Update Propagation
We assume that the server applies the usual steal-and-no-force policy in buffering
pages in the server buffer. In other words, (1) the server can flush onto disk a page
containing uncommitted updates, and (2) at transaction commit, the server does not
flush any database page onto disk.
A page in the cache of client c is called a modified page , if its contents differ
from the server version of the page (i.e., the P AGE -LSN in the client version of the
page is greater than that in the server version of the page) and an unmodified page
otherwise. Recall that a page in the server buffer is called a modified page (from the
point of view of the server) if its contents differ from the disk version of the page.
In shipping modified pages from a client back to the server, the client-side write-
ahead logging or client- WA L protocol is applied: whenever a modified page p is
shipped from client c to the server, all the log records written at c with LSN sup
to and including P AGE -LSN .p/ must also be shipped to the server (if they have not
already been shipped). The server naturally follows the ordinary WA L protocol: a
modified page p can be flushed from the server buffer onto disk only if all log
records with LSN s up to and including P AGE -LSN .p/ have been flushed onto the log
disk.
The client-side commit protocol states that, to commit a transaction or to
complete the rollback of a transaction T at client c, all log records with LSN sup
to and including that of the commit log record of T must be shipped to the server
and flushed onto the log disk.
Within the limits set by the client-side write-ahead-logging and commit pro-
tocols, different update-propagation policies can be defined. In immediate update
propagation , an updated page is shipped to the server and installed into the server
buffer immediately after every single database action (tuple insert, delete, or update)
or structure modification. Thus, after performing a write action WŒxon data page
p at client c, a copy of the modified page p and the log record written for WŒx
are shipped to the server once the write latch on p at c has been released. Similarly,
the three B-tree pages (and the space-map page) involved in a B-tree page split and
the log record written for it are shipped to the server as soon as the modification is
completed. However, the modified pages are not purged from the client cache but
remain there with write privilege.
With immediate update propagation, the current version of the database is the
same as the server version of the database between any two completely performed
actions. A major downside is the high number of page shippings between a client
and the server during a long updating transaction.
In
the
committed-update propagation ,or force-to-server-at-commit
policy,
whenever a transaction T commits or completes its rollback at client c, copies
Search WWH ::




Custom Search