When View- and Conflict-Robustness Coincide for Multiversion Concurrency Control

Brecht Vandevoort,Bas Ketsman,Frank Neven
2024-03-26
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.
Databases
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper mainly explores the relationship between view - robustness and conflict - robustness in Multiversion Concurrency Control (MVCC). Specifically, the authors study the problem of whether these two types of robustness are consistent under a given isolation level. #### Main problems 1. **The equivalence of view - robustness and conflict - robustness**: - Conflict - robustness means that under a given isolation level, all possible interleaved executions of transactions are conflict - serializable. - View - robustness means that under a given isolation level, all possible interleaved executions of transactions are view - serializable. - The core question of the paper is: for some isolation levels, are view - robustness and conflict - robustness always equivalent? If they are equivalent, then under these isolation levels, expanding from conflict - serializable to view - serializable will not allow more sets of transactions to become robust. 2. **Complexity analysis**: - Deciding conflict - serializability can be done in polynomial time, while deciding view - serializability is an NP - complete problem. - The paper also explores the complexity differences between these two types of robustness under the isolation levels (read - committed, snapshot isolation, serializable snapshot isolation) in PostgreSQL and Oracle. #### Research background - In concurrency control, serialization is the most ideal isolation level, but it is usually very costly. - In practical applications, database systems offer multiple weaker isolation levels in exchange for higher performance. - These weaker isolation levels may lead to specific exceptions, but in some cases, a set of transactions can be safely executed under a weaker isolation level without causing errors. #### Main contributions 1. **Proposing a sufficient condition**: Ensure that under some isolation levels, view - robustness and conflict - robustness are consistent. 2. **Proving the isolation levels in PostgreSQL and Oracle** (read - committed, snapshot isolation, serializable snapshot isolation) satisfy this condition. 3. **Revealing the complexity differences**: Although view - robustness and conflict - robustness are consistent under these isolation levels, deciding view - serializability is still an NP - complete problem, while deciding conflict - serializability can be solved in polynomial time. Through these studies, the paper provides a new perspective for understanding robustness in concurrency control and a theoretical basis for further optimizing the concurrency control mechanism of database systems.