Serializable isolation for snapshot databases

Many popular database management systems offer snapshot isolation rather than full serializability. There are well-known anomalies permitted by snapshot isolation that can lead to violations of data consistency by interleaving transactions that individually maintain consistency. Until now, the only way to prevent these anomalies was to modify the applications by introducing artificial locking or update conflicts, following careful analysis of conflicts between all pairs of transactions. This paper describes a modification to the concurrency control algorithm of a database management system that automatically detects and prevents snapshot isolation anomalies at runtime for arbitrary applications, thus providing serializable isolation. The new algorithm preserves the properties that make snapshot isolation attractive, including that readers do not block writers and vice versa. An implementation and performance study of the algorithm are described, showing that the throughput approaches that of snapshot isolation in most cases.

[1]  Paul M. Bober,et al.  On mixing queries and transactions via multiversion locking , 1992, [1992] Eighth International Conference on Data Engineering.

[2]  J. T. Robinson,et al.  On optimistic methods for concurrency control , 1979, TODS.

[3]  David B. Lomet,et al.  Key Range Locking Strategies for Improved Concurrency , 1993, VLDB.

[4]  Thanasis Hadzilacos Serialization graph algorithms for multiversion concurrency control , 1988, PODS '88.

[5]  Patrick E. O'Neil,et al.  A read-only transaction anomaly under snapshot isolation , 2004, SGMD.

[6]  Andreas Reuter,et al.  Transaction Processing: Concepts and Techniques , 1992 .

[7]  Irving L. Traiger,et al.  The notions of consistency and predicate locks in a database system , 1976, CACM.

[8]  Marc H. Scholl,et al.  Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery , 2001, SGMD.

[9]  H. T. King,et al.  On Optimistic Methods For Concurrency Control , 1979, VLDB 1979.

[10]  Michael Stonebraker,et al.  The Performance of Concurrency Control Algorithms for Database Management Systems , 1984, VLDB.

[11]  Margo I. Seltzer,et al.  Using probabilistic reasoning to automate software tuning , 2004, SIGMETRICS '04/Performance '04.

[12]  Miron Livny,et al.  Concurrency control performance modeling: alternatives and implications , 1987, TODS.

[13]  Yang Yang The adaptive serializable snapshot isolation protocol for managing database transactions , 2007 .

[14]  Alan Fekete,et al.  The Cost of Serializability on Platforms That Use Snapshot Isolation , 2008, 2008 IEEE 24th International Conference on Data Engineering.

[15]  Dennis Shasha,et al.  Making snapshot isolation serializable , 2005, TODS.

[16]  Stephen Fox,et al.  Overview of an Ada compatible distributed database manager , 1983, SIGMOD '83.

[17]  Irving L. Traiger,et al.  Granularity of Locks in a Large Shared Data Base. , 1975, VLDB 1975.

[18]  C. Mohan,et al.  ARIES/IM: an efficient and high concurrency index management method using write-ahead logging , 1992, SIGMOD '92.

[19]  Philip A. Bernstein,et al.  Categories and Subject Descriptors: H.2.4 [Database Management]: Systems. , 2022 .

[20]  Alan Fekete,et al.  Allocating isolation levels to transactions , 2005, PODS '05.

[21]  Philip A. Bernstein,et al.  Concurrency Control in Distributed Database Systems , 1986, CSUR.

[22]  Hamid Pirahesh,et al.  Efficient and flexible methods for transient versioning of records to avoid locking by read-only transactions , 1992, SIGMOD '92.

[23]  C. Mohan,et al.  ARIES/KVL: A Key-Value Locking Method for Concurrency Control of Multiaction Transactions Operating on B-Tree Indexes , 1990, VLDB.

[24]  Yoav Raz Commitment ordering based distributed concurrency control for bridging single and multi version resources , 1993, Proceedings RIDE-IMS `93: Third International Workshop on Research Issues in Data Engineering: Interoperability in Multidatabase Systems.

[25]  William Perrizo,et al.  A New Method for Concurrency Control in Centralized Database Systems , 2002, CATA.

[26]  Fernando Pedone,et al.  Database replication using generalized snapshot isolation , 2005, 24th IEEE Symposium on Reliable Distributed Systems (SRDS'05).

[27]  Daniel J. Rosenkrantz,et al.  Concurrency control for database systems , 1976, 17th Annual Symposium on Foundations of Computer Science (sfcs 1976).

[28]  Alan Fekete,et al.  Serializable Executions with Snapshot Isolation: Modifying Application Code or Mixing Isolation Levels? , 2008, DASFAA.

[29]  Michael J. Carey,et al.  The performance of multiversion concurrency control algorithms , 1986, TOCS.

[30]  David P. Reed,et al.  Naming and synchronization in a decentralized computer system , 1978 .

[31]  Shiyong Lu,et al.  Semantic conditions for correctness at different isolation levels , 2000, Proceedings of 16th International Conference on Data Engineering (Cat. No.00CB37073).

[32]  Tada Harumasa,et al.  A Concurrency Control Algorithm Using Serialization Graph Testing with Write Deferring , 1997 .

[33]  Jim Gray,et al.  A critique of ANSI SQL isolation levels , 1995, SIGMOD '95.

[34]  Margo I. Seltzer,et al.  Berkeley DB , 1999, USENIX Annual Technical Conference, FREENIX Track.

[35]  S. Sudarshan,et al.  Automating the Detection of Snapshot Isolation Anomalies , 2007, VLDB.

[36]  Vijay Kumar Performance of concurrency control mechanisms in centralized database systems , 1995 .

[37]  Michael J. Carey,et al.  The Performance of Alternative Strategies for Dealing with Deadlocks in Database Management Systems , 1987, IEEE Transactions on Software Engineering.

[38]  Bettina Kemme,et al.  Postgres-R(SI): combining replica control with concurrency control based on snapshot isolation , 2005, 21st International Conference on Data Engineering (ICDE'05).

[39]  Barbara Liskov,et al.  Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions , 1999 .