Information Technology Reference
In-Depth Information
To perform a delete action DŒx; v , if this is the first update on key x by T ,the
version .x; v / of the tuple with key x is retrieved from the most recent committed
database version, the versioned tuple .x; T; ? / is inserted into the database and
the insertion is redo-undo logged. The tuple .x; v / must exist and satisfy v 6D? .
Otherwise, if T has earlier inserted or written the tuple, so that a versioned tuple
.x; T; v / with v 6D? exists, then that tuple is replaced by the tuple .x; T; ? / and the
replacement is redo-undo logged.
The undo actions W 1 Œx; u ; v , I 1 Œx; v ,andD 1 Œx; v operate as expected,
using the log record for the corresponding forward-rolling action to undo the action
and logging the undoing with a redo-only log record.
12.3
Transaction-Level Read Consistency
Under transaction-level read consistency , the read actions of every read-only
transaction T read from the same database version, usually that of start-time .T /,
while every update transaction runs at the serializable isolation level. Accordingly,
the read and update (insert, delete, write) actions of every update transaction operate
on the most recent tuple versions.
Example 12.3 The history
BR Œx; x; u 0 RŒy; y; v 0
RŒy; y; v 0 C
T 1 :
T 2 : BW Œx; u 0 ; u 2 W Œy; v 0 ; v 2 C
(cf. Example 12.1 ) is possible under transaction-level read consistency and so is the
history
T 1 :
BI Œ2; w 1 RŒ2; > 1; w 1
RŒ3; > 2; w 2 C
T 2 :
BI Œ3; w 2 C
t
of Example 12.2 .
Isolation anomalies that may appear in this setting are the usual dirty writes,
dirty reads, and unrepeatable reads between two update transactions as defined in
Sect. 5.3 for single-version databases. Thus, it is a dirty write if a transaction writes,
inserts, or deletes a tuple with key x whenatuplewithkeyx has been written,
inserted, or deleted by another, still active transaction. As before, dirty writes
must be prevented under all circumstances. When using a pessimistic concurrency-
control protocol such as locking, this means that the simultaneous existence of two
versioned tuples .x; T; v / and .x; T 0 ; v 0 /, where both T and T 0 are active, is not
allowed.
A read action RŒx; z ; v by an update transaction T 2 is a dirty read if some
key y with x y z has an uncommitted update by some other transaction T 1 ,
for example, there is a versioned tuple .y; T 1 ; w /,whereT 1 is still active. A read
action RŒx; z ; v by an update transaction T 1 is an unrepeatable read if some other
Search WWH ::




Custom Search