3.2.7 Transactions and Concurrency

  1. 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).

    1. Impossible under strict locking or timestmping with TST > TSU, possible under occ or timestamping with TST < TSU.
    2. Possible under locking, occ, timestamping with TST < TSU, impossible under timestmping with TST > TSU.
    3. Possible under locking, occ,timestmping with TST > TSU, impossible with timestamping with TST < TSU
    4. Possible under timestamping with TST > TSU, impossible otherwise
    5. 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.

  2. 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.

Ian Wakeman 2005-02-22