Definitionadvanced
Multiversion serializability
Also called multiversion serialization graph, MVSR, one-copy serializability of multiversion schedules.
A multiversion schedule is serializable when its reads-from relation is that of a serial run on one copy of each item. A version order with an acyclic MVSG proves it.
A multiversion schedule lets a read return an older version of an item, as multiversion concurrency control does. Multiversion serializability (MVSR) says when such a schedule is correct: it must look, to every transaction, like a serial run on a database with one copy of each item. The notion uses the reads-from relation, as view serializability does, and not the order of conflicting steps of conflict serializability, because writes of the same item no longer overwrite each other. Bernstein and Goodman (1983) called it one-copy serializability, the name also used for replicated data on the one-copy serializability page. The multiversion serialization graph (MVSG) is the tool to prove it: a schedule is MVSR if and only if some order of the versions of each item makes this graph acyclic. Testing MVSR is NP-complete, so schedulers such as multiversion timestamp ordering and snapshot isolation fix the version order in advance.
Definition
Versions. Each write of transaction makes a new version . An initial transaction writes the version of every item before the schedule starts. A multiversion schedule is a schedule of steps and , together with commits and aborts, in which each read comes after , and a transaction that has written reads its own version . The map from each read to the version it returns is the version function. A monoversion schedule is one where each read returns the version of the last write of the item before it; this is an ordinary schedule.
Reads-from. reads from in if contains . Two multiversion schedules on the same transactions are view equivalent if they have the same steps and the same reads-from relation. There is no condition on final writes, because every version stays available.
MVSR. A multiversion schedule is multiversion serializable if its committed projection is view equivalent to a serial monoversion schedule of the same committed transactions. In the serial monoversion schedule each read returns the last version written before it in the serial order.
Version order and MVSG. A version order is, for each item , a total order on the committed versions of with first. For a schedule and a version order , the graph has a node for each committed transaction, including , and these arcs:
- whenever reads from , (the reads-from arcs);
- for each read and each write with , , distinct: if , and if (the version order arcs).
MVSG theorem (Bernstein and Goodman, 1983). A multiversion schedule is MVSR if and only if there is a version order such that is acyclic. A serial order is then any topological sort of the graph.
The version order arcs say that a writer of goes either before the writer of the version that read, or after the reader ; it cannot fall between them, since then would read in the serial run.
Multiversion conflicts. A simpler, conflict-based class MCSR counts only the pair " before " as a conflict. Weikum and Vossen show that MCSR is strictly contained in MVSR, and that MCSR can be tested in polynomial time.
Examples and non-examples
An old version repairs a schedule. reads and ; writes both.
As a monoversion schedule, would read , would come before on and after it on , and the schedule would not be serializable. With the old version , reads both items from , which is the serial schedule . With and , the MVSG has the reads-from arc and the version order arc (from and , and again from and ), and no cycle. A long read-only transaction under multiversion timestamp ordering or snapshot isolation behaves in this way.
Write skew is not MVSR.
In the serial order , would read ; in , would read . Neither matches. In the graph, the only possible version order puts first, so and give , and and give : a cycle for every version order. Snapshot isolation allows this schedule; it is the write skew.
The version order matters. In , the order gives the arcs and, from and , : the serial order is , so is MVSR. The order also gives an acyclic graph, with the serial order . Read as a monoversion schedule, would return and not , so the multiversion schedule has a reads-from relation that no monoversion schedule with the same step order has.
Monoversion schedules. A view serializable monoversion schedule is MVSR with its own version function, so VSR is contained in MVSR. The containment is strict, as the first example shows.
Not MVSR, for every version order. reads two different versions of in one transaction with no write of between. Before in the serial order, reads twice; after it, reads twice. Neither matches, so is not MVSR.
Related definitions
- View serializability is the monoversion form; it also needs the same final writes. Its test is NP-complete, by view-serializability NP-completeness; Papadimitriou and Kanellakis (1984) proved the same for MVSR.
- Conflict serializability, tested by the serializability theorem, is contained in view serializability, so a conflict serializable monoversion schedule is MVSR. The MVSG has no arcs for two writes alone: the order of two blind writes matters only through the reads around them.
- One-copy serializability for replicated data has the same form: the copies there play the part of versions here.
- Snapshot isolation and multiversion timestamp ordering fix the version order by commit time or by timestamp, so the MVSG becomes a graph that a scheduler can keep.
- Adya's isolation levels use the same graph with the version order given by the history, split into write, read and anti-dependency arcs, and define weaker levels by the cycles they forbid. The dangerous structure theorem is a statement about the cycles of this graph under snapshot isolation.
References
- Philip A. Bernstein and Nathan Goodman, Multiversion concurrency control, theory and algorithms, ACM Transactions on Database Systems 8(4), 1983, pages 465 to 483, the definitions of multiversion histories and one-copy serializability, and the multiversion serialization graph theorem
- Christos H. Papadimitriou and Paris C. Kanellakis, On concurrency control by multiple versions, ACM Transactions on Database Systems 9(1), 1984, pages 89 to 99, the NP-completeness of testing multiversion serializability, chapter level only
- Philip A. Bernstein, Vassos Hadzilacos and Nathan Goodman, Concurrency Control and Recovery in Database Systems, Addison-Wesley, 1987, Chapter 5, Multiversion Concurrency Control (multiversion histories, one-copy serializability and the MVSG theorem)
- Gerhard Weikum and Gottfried Vossen, Transactional Information Systems, Morgan Kaufmann, 2001, Chapter 5, Multiversion Concurrency Control (the classes MVSR and MCSR, VSR inside MVSR, and the NP-completeness of MVSR)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 7MFAKN Edit this page History Report an error Markdown