Information Technology Reference
In-Depth Information
will still commit if no system crash occurs before the next log flush; however, in
this case the application will not be notified of the commit.
The commit action C of a transaction T is now executed using the call
precommit .T / (Algorithm 15.1 ), instead of using the standard call commit .T /
(Algorithm 3.3 ). The difference is that the call precommit .T / only appends the
commit log record of T to the log buffer, without flushing the log, releases all locks
held by T , and, instead of notifying immediately of the commit, waits for the next
group commit to occur. The group commit is executed using the call group-commit ./
(Algorithm 15.2 ), which just flushes the log and wakes up the server-process threads
waiting for the group commit.
Algorithm 15.1 Procedure precommit .T /
log .n;hT; Ci/
Release all locks held by T
Delete the transaction record of T from the active-transaction table
Wait for the event “group commit done”
Return a notification of the commit of T to the application process
Algorithm 15.2 Procedure group-commit ./
flush-the-log ./
Raise the event “group commit done”
With group commit, early lock release refers to the feature that a transaction
releases its commit-duration locks after appending the commit log record to the log
buffer but before the log records of the transaction are flushed onto the log disk.
Because a transaction actually commits only after the log has been flushed, early
lock release permits the appearance of any of the isolation anomalies dirty writes,
dirty reads, and unrepeatable reads, in the strict meaning of these concepts. We have
to show that an anomaly that appears only if a C action is taken to mean precommit
rather than commit cannot cause any harm during normal transaction processing or
in recovering from a failure.
During normal transaction processing, because the commit-duration locks held
by a transaction are released in performing the commit action, a transaction history
that is possible under the group commit protocol (with the C action meaning
precommit) is always possible under the standard commit protocol (with C meaning
standard commit). This implies further that for any committed transaction T (i.e.,
one that has its commit log record on the log disk), the transaction history including
the commit action of T does not contain any isolation anomalies for T that are not
permitted by the locking protocol. This is because all the transactions that have their
commit action before that of T are then also committed.
We then show that recoverability is maintained, so that a transaction that wants
to perform a partial or total rollback during normal processing or that is active
 
Search WWH ::




Custom Search