Multiversion Schemes
Multiversion Schemes
n Each successful write results in the creation of a new version of the data item written.
n Each data item Q has a sequence of versions <Q1, Q2,...., Qm>. Each version Qk contains three
data fields:
n When a transaction Ti creates a new version Qk of Q, Qk's W-timestamp and R-timestamp are
initialized to TS(Ti).
n Suppose that transaction Ti issues a read(Q) or write(Q) operation. Let Qk denote the
version of Q whose write timestamp is the largest write timestamp less than or equal to
TS(Ti).
n Observe that
n Update transactions acquire read and write locks, and hold all locks up to the end of the
transaction. That is, update transactions follow rigorous two-phase locking.
l Each successful write results in the creation of a new version of the data item
written.
l Each version of a data item has a single timestamp whose value is obtained from a
counter ts-counter that is incremented during commit processing.
n Read-only transactions are assigned a timestamp by reading the current value of ts-counter
before they start execution; they follow the multiversion timestamp-ordering protocol for
performing reads.
l it obtains X lock on; it then creates a new version of the item and sets this version's
timestamp to .
l Ti increments ts-counter by 1
n Read-only transactions that start after Ti increments ts-counter will see the values updated
by Ti.