When View- and Conflict-Robustness Coincide for Multiversion Concurrency Control (2403.17665v1)
Abstract: A DBMS allows trading consistency for efficiency through the allocation of isolation levels that are strictly weaker than serializability. The robustness problem asks whether, for a given set of transactions and a given allocation of isolation levels, every possible interleaved execution of those transactions that is allowed under the provided allocation, is always safe. In the literature, safe is interpreted as conflict-serializable (to which we refer here as conflict-robustness). In this paper, we study the view-robustness problem, interpreting safe as view-serializable. View-serializability is a more permissive notion that allows for a greater number of schedules to be serializable and aligns more closely with the intuitive understanding of what it means for a database to be consistent. However, view-serializability is more complex to analyze (e.g., conflict-serializability can be decided in polynomial time whereas deciding view-serializability is NP-complete). While conflict-robustness implies view-robustness, the converse does not hold in general. In this paper, we provide a sufficient condition for isolation levels guaranteeing that conflict- and view-robustness coincide and show that this condition is satisfied by the isolation levels occurring in Postgres and Oracle: read committed (RC), snapshot isolation (SI) and serializable snapshot isolation (SSI). It hence follows that for these systems, widening from conflict- to view-serializability does not allow for more sets of transactions to become robust. Interestingly, the complexity of deciding serializability within these isolation levels is still quite different. Indeed, deciding conflict-serializability for schedules allowed under RC and SI remains in polynomial time, while we show that deciding view-serializability within these isolation levels remains NP-complete.
- Atul Adya. 1999. Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions. Ph.D. MIT, Cambridge, MA, USA.
- Generalized Isolation Level Definitions. In ICDE. 67–78.
- A Critique of ANSI SQL Isolation Levels. In SIGMOD. 1–10.
- Giovanni Bernardi and Alexey Gotsman. 2016. Robustness against Consistency Models with Atomic Visibility. In CONCUR. 7:1–7:15.
- Philip A. Bernstein and Nathan Goodman. 1983. Multiversion Concurrency Control - Theory and Algorithms. ACM Trans. Database Syst. 8, 4 (1983), 465–483.
- Ranadeep Biswas and Constantin Enea. 2019. On the complexity of checking transactional consistency. Proc. ACM Program. Lang. 3, OOPSLA (2019), 165:1–165:28.
- Serializable isolation for snapshot databases. In SIGMOD. 729–738.
- Serializable isolation for snapshot databases. ACM Trans. Database Syst. 34, 4 (2009), 20:1–20:42.
- A Framework for Transactional Consistency Models with Atomic Visibility. In CONCUR. 58–71.
- Andrea Cerone and Alexey Gotsman. 2018. Analysing Snapshot Isolation. J.ACM 65, 2 (2018), 1–41.
- Algebraic Laws for Weak Consistency. In CONCUR. 26:1–26:18.
- Alan Fekete. 2005. Allocating isolation levels to transactions. In PODS. 206–215.
- Making snapshot isolation serializable. ACM Trans. Database Syst. 30, 2 (2005), 492–528.
- Deciding Robustness for Lower SQL Isolation Levels. In PODS. 315–330.
- Christos H. Papadimitriou. 1979. The serializability of concurrent database updates. J.ACM 26, 4 (1979), 631–653.
- Christos H. Papadimitriou. 1986. The Theory of Database Concurrency Control. Computer Science Press.
- Christos H. Papadimitriou and Paris C. Kanellakis. 1984. On Concurrency Control by Multiple Versions. ACM Trans. Database Syst. 9, 1 (1984), 89–99.
- Dan R. K. Ports and Kevin Grittner. 2012. Serializable Snapshot Isolation in PostgreSQL. PVLDB 5, 12 (2012), 1850–1861.
- TPC-C. [n. d.]. On-Line Transaction Processing Benchmark. ([n. d.]). http://www.tpc.org/tpcc/.
- Robustness against Read Committed for Transaction Templates. PVLDB 14, 11 (2021), 2141–2153.
- Robustness Against Read Committed for Transaction Templates with Functional Constraints. In ICDT. 16:1–16:17.
- Detecting Robustness against MVRC for Transaction Programs with Predicate Reads. In EDBT. 565–577.
- Allocating Isolation Levels to Transactions in a Multiversion Setting. In PODS. 69–78.
- Mihalis Yannakakis. 1984. Serializability by Locking. J.ACM 31, 2 (1984), 227–244.