Consistency anomalies in multi-tier architectures: automatic detection and prevention

Modern transaction systems, consisting of an application server tier and a database tier, offer several levels of isolation providing a trade-off between performance and consistency. While it is fairly well known how to identify qualitatively the anomalies that are possible under a certain isolation level, it is much more difficult to detect and quantify such anomalies during run-time of a given application. In this paper, we present a new approach to detect and quantify consistency anomalies for arbitrary multi-tier application running under any isolation levels ensuring at least read committed. In fact, the application can run even under a mixture of isolation levels. Our detection approach can be online or off-line and for each detected anomaly, we identify exactly the transactions and data items involved. Furthermore, we classify the detected anomalies into patterns showing the business methods involved as well as analyzing the types of cycles that occur. Our approach can help designers to either choose an isolation level where the anomalies do not occur or to change the transaction design to avoid the anomalies. Furthermore, we provide an option in which the occurrence of anomalies can be automatically reduced during run-time. To test the effectiveness and efficiency of our approach, we have conducted a set of experiments using a wide range of benchmarks.

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

[2]  Marco A. Casanova,et al.  The Concurrency Control Problem for Database Systems , 1981, Lecture Notes in Computer Science.

[3]  Alan Fekete,et al.  Quantifying Isolation Anomalies , 2009, Proc. VLDB Endow..

[4]  Heiko Schuldt,et al.  FAS - A Freshness-Sensitive Coordination Middleware for a Cluster of OLAP Components , 2002, VLDB.

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

[6]  Michael J. Cahill Serializable isolation for snapshot databases , 2009, TODS.

[7]  Amit P. Sheth,et al.  On serializability of multidatabase transactions through forced local conflicts , 1991, [1991] Proceedings. Seventh International Conference on Data Engineering.

[8]  Gustavo Alonso,et al.  Consistency Rationing in the Cloud: Pay only when it matters , 2009, Proc. VLDB Endow..

[9]  Bettina Kemme,et al.  ConsAD: a real-time consistency anomalies detector , 2012, SIGMOD Conference.

[10]  Dan R. K. Ports,et al.  Serializable Snapshot Isolation in PostgreSQL , 2012, Proc. VLDB Endow..

[11]  C. Amza,et al.  Specification and implementation of dynamic Web site benchmarks , 2002, 2002 IEEE International Workshop on Workload Characterization.

[12]  Philip A. Bernstein,et al.  Relaxed-currency serializability for middle-tier caching and replication , 2006, SIGMOD Conference.

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

[14]  Kenneth Salem,et al.  Inferring a Serialization Order for Distributed Transactions , 2006, 22nd International Conference on Data Engineering (ICDE'06).

[15]  Bettina Kemme,et al.  Real-time quantification and classification of consistency anomalies in multi-tier architectures , 2011, 2011 IEEE 27th International Conference on Data Engineering.

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

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

[18]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[19]  Sebastian Schmidt,et al.  Freshness-Aware Caching in a Cluster of J2EE Application Servers , 2007, WISE.

[20]  Patrick E. O'Neil,et al.  Precisely Serializable Snapshot Isolation (PSSI) , 2011, 2011 IEEE 27th International Conference on Data Engineering.

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

[22]  Alan Fekete,et al.  Serialisability and Snapshhot Isolation , 1999, Australasian Database Conference.

[23]  Daniel Gómez Ferro,et al.  A critique of snapshot isolation , 2012, EuroSys '12.

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

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

[26]  Bettina Kemme,et al.  How consistent is your cloud application? , 2012, SoCC '12.

[27]  Fernando Pedone,et al.  Tashkent: uniting durability with transaction ordering for high-performance scalable database replication , 2006, EuroSys.