Information Technology Reference
In-Depth Information
Example 5.10 The action R 1 Œx by transaction T 1 is an unrepeatable read in the
histories
B 1 :::R 1 Œx:::B 2 :::W 2 Œx:::C 1 ::: ,
B 1 :::R 1 Œx:::B 2 :::D 2 Œx:::C 1 ::: ,
assuming that T 1 is still forward-rolling when transaction T 2 performs its update
action. The predicate P in the definition is “X D x.”
The read action R 1 Œx is called unrepeatable, because repeating it in T 1 after the
commit of T 2 may be impossible: after W 2 Œx the action RŒx is likely to produce a
tuple with a value different from that obtained in the first reading, and after D 2 Œx,
the action RŒx; x is impossible, and the action RŒx 0 ; z will produce a tuple with
key x 0 different from x. It is a natural requirement that if T 1 does not itself update
the tuple with key x in the interim, then the read action RŒx should be repeatable
within T 1 .
The above histories represent the simple type of an unrepeatable read in which
the key updated is the key read.
t
Example 5.11 The action R 1 Œx; > z by transaction T 1 is an unrepeatable read in the
history
B 1 :::R 1 Œx; > z :::B 2 :::I 2 Œy:::C 1 ::: ,
if x>y> z , assuming that T 1 is still forward-rolling when transaction T 2 performs
its insert action. The predicate P in the definition is “x X> z .”
The above history exhibits an unrepeatable read of type phantom phenomenon .
The tuple with key y that appears into the key range . z ;x due to the insert action
by T 2 is called a phantom tuple .
t
We say that a transaction T in history H D ˛LJ is forward-rolling (resp.
aborted , backward-rolling , committed , rolled-back , active ,or terminated ) at ˛,if
the prefix T 0 of T contained in ˛ is forward-rolling (resp. aborted, backward-rolling,
committed, rolled-back, active, or terminated) in the history ˛.
For our transaction models (the read-write and key-range model), the isolation
anomalies are defined as follows:
1. An update action o 2 Œx on key x by transaction T 2 is a dirty write in history
˛o 2 ŒxLJ,ifx has an uncommitted update by another transaction T 1 in ˛.
2. A read action R 2 Œx; z by transaction T 2 is a dirty read in history ˛R 2 Œx; z LJ,
if some key y with x y z has an uncommitted update by another transaction
T 1 in ˛. The dirty read is a simple dirty read if here x D y and a phantom dirty
read (or a dirty read of type phantom phenomenon )ifx>y.
3. A read action R 1 Œx; z by transaction T 1 is an unrepeatable read in history
˛R 1 Œx; z LJo 2 Œy ,ifT 1 is forward-rolling at ˛R 1 Œx; z LJ and o 2 Œy is an update
action by another transaction T 2 on key y with x y z . The unrepeatable read
is a simple unrepeatable read if here x D y and a phantom unrepeatable read
(or an unrepeatable read of type phantom phenomenon )ifx>y.
Search WWH ::




Custom Search