Testing isolation levels of relational database management systems

This thesis studies approaches for testing and understanding the implementation of Isolation Levels by Relational Database Management Systems. Isolation is the property of these systems that ensures that concurrent transactions do not interfere. The Isolation Levels feature has been developed to improve performance when full correctness is not desirable or when correctness could be assured at the application level. The definitions of Isolation Levels, below the serializable level, are evolving and there are not yet well-accepted general definitions. A tool and methodology for testing whether a system behaves according to some definition, or for understanding the exact behavior of a given system, is very important because very critical applications use this technology, and problems in implementations or misuse of Isolation Levels could have very adverse side-effects (e.g. money being lost, collisions in reservations, bad estimates etc). The tool we have developed processes specifications of concurrency scenarios, called input histories and produces output histories at various database Isolation Levels. The input histories are made up of a series of generically specified transactional operations for several concurrent transactions. By analyzing the results in the output history, it can be determined whether the execution was correct under a given isolation level or levels. We introduce two methodologies: comparative testing and gray box testing and we focus on gray-box testing of database systems that are known to use single-version concurrency control algorithms based on preventing concurrent execution of conflicting operations. This is usually achieved by locking. We prove a theorem showing that for testing these types of schedulers it is adequate to test whether each isolation level proscribes the execution of certain pairs of conflicting operations. We have executed histories including all different types of conflicting pairs of operations. Among interesting results, we have detected that the isolation level of a particular version of a database system that corresponds to the READ COMMITTED ANSI SQL would allow execution of a certain type of conflicting operations (write/predicate-read) that should be proscribed. The results we have generated demonstrate the utility of our methodology.

[1]  Donald R. Slutz,et al.  Massive Stochastic Testing of SQL , 1998, VLDB.

[2]  J. Banerjee,et al.  Precision locks , 1981, SIGMOD '81.

[3]  Patrick Valduriez,et al.  Transaction chopping: algorithms and performance studies , 1995, TODS.

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

[5]  Christos H. Papadimitriou,et al.  The serializability of concurrent database updates , 1979, JACM.

[6]  Patrick E. O'Neil,et al.  Generalized isolation level definitions , 2000, Proceedings of 16th International Conference on Data Engineering (Cat. No.00CB37073).

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

[8]  Patrick E. O'Neil,et al.  Database: Principles, Programming, and Performance, Second Edition , 2000 .

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

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

[11]  Christos H. Papadimitriou,et al.  The Theory of Database Concurrency Control , 1986 .

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

[13]  C. Mohan Concurrency Control and Recovery Methods for B+-Tree Indexes: ARIES/KVL and ARIES/IM , 1996, Performance of Concurrency Control Mechanisms in Centralized Database Systems.

[14]  Irving L. Traiger,et al.  Granularity of Locks and Degrees of Consistency in a Shared Data Base , 1998, IFIP Working Conference on Modelling in Data Base Management Systems.

[15]  Irving L. Traiger,et al.  A history and evaluation of System R , 1981, CACM.