An inconsistent retrieval occurs when a transaction reads
values that another transaction has only partially
updated, leaving the set of values in an inconsistent
state. An example pattern is
RT(x), WU(y), RT(y), WU(x).
Impossible under strict locking or timestmping with
TST > TSU, possible under occ or
timestamping with
TST < TSU.
Possible under locking, occ, timestamping with
TST < TSU, impossible under
timestmping with
TST > TSU.
Possible under locking,
occ,timestmping with
TST > TSU, impossible with timestamping with
TST < TSU
Possible under timestamping with
TST > TSU, impossible otherwise
Impossible under locking and timestamping. Possible
under optimistic concurrency control. Why? Because the
writes don't actually reveal their changed values till
the transactions commit.
A transaction may do a lot of work without accessing
data values before it accesses the shared data. Thus
its timestamp may be very old before it even accesses
the data, and thus may have a high probability of
abortion. A better time to allocate the timestamp is
when it first accesses data.