Abstract
Database replication is widely used for fault tolerance and performance. However, it requires replica control to keep data copies consistent despite updates. The traditional correctness criterion for the concurrent execution of transactions in a replicated database is 1-copy-serializability. It is based on serializability, the strongest isolation level in a nonreplicated system. In recent years, however, Snapshot Isolation (SI), a slightly weaker isolation level, has become popular in commercial database systems. There exist already several replica control protocols that provide SI in a replicated system. However, most of the correctness reasoning for these protocols has been rather informal. Additionally, most of the work so far ignores the issue of integrity constraints. In this article, we provide a formal definition of 1-copy-SI using and extending a well-established definition of SI in a nonreplicated system. Our definition considers integrity constraints in a way that conforms to the way integrity constraints are handled in commercial systems. We discuss a set of necessary and sufficient conditions for a replicated history to be producible under 1-copy-SI. This makes our formalism a convenient tool to prove the correctness of replica control algorithms.
Supplemental Material
Available for Download
Online appendix to snapshot isolation and integrity constraints in replicated databases. The appendix supports the information on article 11.
- ]]Adya, A. 1999. Weak consistency: A generalized theory and optimistic implementations for distributed transactions. Ph.D. thesis, MIT, Cambridge. Google ScholarDigital Library
- ]]Adya, A., Liskov, B., and O'Neil, P. E. 2000. Generalized isolation level definitions. In Proceedings of the IEEE International Conference on Data Engineering (ICDE), 67--78. Google ScholarDigital Library
- ]]Alomari, M., Cahill, M. J., Fekete, A., and Röhm, U. 2008. The cost of serializability on platforms that use snapshot isolation. In Proceedings of the IEEE International Conference on Data Engineering (ICDE), 576--585. Google ScholarDigital Library
- ]]Amza, C., Cox, A. L., and Zwaenepoel, W. 2003. Distributed versioning: Consistent replication for scaling back-end databases of dynamic content Web sites. In Proceedings of the ACM/IFIP/USENIX International Middleware Conference, 282--302. Google ScholarDigital Library
- ]]ANSI X3.135-1992. 1992. American National Standard for Information Systems—Database Language- SQL.Google Scholar
- ]]Berenson, H., Bernstein, P., Gray, J., Melton, J., O'Neil, E., and O'Neil, P. 1995. A critique of ANSI SQL isolation levels. In Proceedings of the ACM SIGMOD International Conference on Management of Data, 1--10. Google ScholarDigital Library
- ]]Bernstein, P. A., Fekete, A., Guo, H., Ramakrishnan, R., and Tamma, P. 2006. Relaxed-currency serializability for middle-tier caching and replication. In Proceedings of the ACM SIGMOD International Conference on Management of Data, 599--610. Google ScholarDigital Library
- ]]Bernstein, P. A., Hadzilacos, V., and Goodman, N. 1987. Concurrency Control and Recovery in Database Systems. Addison-Wesley. Google ScholarDigital Library
- ]]Breitbart, Y., Komondoor, R., Rastogi, R., Seshadri, S., and Silberschatz, A. 1999. Update propagation protocols for replicated databases. In Proceedings of the ACM SIGMOD International Conference on Management of Data, 97--108. Google ScholarDigital Library
- ]]Breitbart, Y. and Korth, H. F. 1997. Replication and consistency: Being lazy helps sometimes. In Proceedings of the ACM International Symposium on Principles of Database Systems (PODS), 173--184. Google ScholarDigital Library
- ]]Cahill, M., Röhm, U., and Fekete, A. 2008. Serializable isolation for snapshot databases. In Proceedings of the ACM SIGMOD International Conference on Management of Data, 729--738. Google ScholarDigital Library
- ]]Carey, M. J. and Livny, M. 1991. Conflict detection tradeoffs for replicated data. ACM Trans. Data. Syst. 16, 4, 703--746. Google ScholarDigital Library
- ]]Cecchet, E., Marguerite, J., and Zwaenepoel, W. 2004. C-JDBC: Flexible database clustering middleware. In Proceedings of USENIX Annual Technical Conference, FREENIX Track. 9--18. Google ScholarDigital Library
- ]]Chockler, G., Keidar, I., and Vitenberg, R. 2001. Group communication specifications: A comprehensive study. ACM Comput. Surv. 33, 4, 427--469. Google ScholarDigital Library
- ]]Chundi, P., Rosenkrantz, D. J., and Ravi, S. S. 1996. Deferred updates and data placement in distributed databases. In Proceedings of the IEEE International Conference on Data Engineering (ICDE), 469--476. Google ScholarDigital Library
- ]]Daudjee, K. and Salem, K. 2006. Lazy database replication with snapshot isolation. In Proceedings of International Conference on Very Large Data Bases (VLDB), 715--726. Google ScholarDigital Library
- ]]Elnikety, S., Pedone, F., and Zwaenopoel, W. 2005. Database replication using generalized snapshot isolation. In Proceedings of the International Symposium on Reliable Distributed Systems (SRDS), 73--84. Google ScholarDigital Library
- ]]Fekete, A., Liarokapis, D., O'Neil, E., O'Neil, P., and Shasha, D. 2005. Making snapshot isolation serializable. ACM Trans. Data. Syst. 30, 2, 492--528. Google ScholarDigital Library
- ]]Gançarski, S., Naacke, H., Pacitti, E., and Valduriez, P. 2007. The leganet system: Freshness-Aware transaction routing in a database cluster. Inform. Syst. 32, 2, 320--343. Google ScholarDigital Library
- ]]Holliday, J., Steinke, R. C., Agrawal, D., and Abbadi, A. E. 2003. Epidemic algorithms for replicated databases. IEEE Trans. Knowl. Data Engin. 15, 5, 1218--1238. Google ScholarDigital Library
- ]]Kemme, B. and Alonso, G. 2000. A new approach to developing and implementing eager database replication protocols. ACM Trans. Data. Syst. 25, 3, 333--379. Google ScholarDigital Library
- ]]Lin, Y., Kemme, B., Patiño-Martínez, M., and Jiménez-Peris, R. 2005. Middleware-based data replication providing snapshot isolation. In Proceedings of the ACM SIGMOD International Conference on Management of Data, 419--430. Google ScholarDigital Library
- ]]Microsoft SQL Server 2005. 2007. SQL Server 2005 row versioning-based transaction isolation.Google Scholar
- ]]Muñoz-Escoí, F. D., Pla-Civera, J., Ruiz-Fuertes, M. I., Irún-Briz, L., Decker, H., Armendáriz-Iñigo, J. E., and González de Mendívil, J. R. 2006. Managing transaction conflicts in middleware-based database replication architectures. In Proceedings of the International Symposium on Reliable Distributed Systems (SRDS), 401--410. Google ScholarDigital Library
- ]]Oracle Corporation. 2007. Oracle 11g Release 1.Google Scholar
- ]]Pacitti, E., Minet, P., and Simon, E. 1999. Fast algorithm for maintaining replica consistency in lazy master replicated databases. In Proceedings of the International Conference on Very Large Data Bases (VLDB), 126--137. Google ScholarDigital Library
- ]]Patiño-Martínez, M., Jiménez-Peris, R., Kemme, B., and Alonso, G. 2005. MIDDLE-R: Consistent database replication at the middleware level. ACM Trans. Comput. Syst. 23, 4, 375--423. Google ScholarDigital Library
- ]]Pedone, F., Guerraoui, R., and Schiper, A. 2003. The database state machine approach. Distrib. Parall. Data. 14, 1, 71--98. Google ScholarDigital Library
- ]]Perez-Sorrosal, F., Patiño-Martínez, M., Jiménez-Peris, R., and Kemme, B. 2007. Consistent and scalable cache replication for multi-tier J2EE applications. In Proceedings of the ACM/IFIP/USENIX International Middleware Conference, 328--347. Google ScholarDigital Library
- ]]Plattner, C. and Alonso, G. 2004. Ganymed: Scalable replication for transactional Web applications. In Proceedings of the ACM/IFIP/USENIX International Middleware Conference, 155--174. Google ScholarDigital Library
- ]]Plattner, C., Alonso, G., and Özsu, M. T. 2008. Extending DBMSs with satellite databases. VLDB J. 17, 4, 657--682. Google ScholarDigital Library
- ]]PostgreSQL. 2007. PostgreSQL, the world's most advanced open source database.Google Scholar
- ]]Röhm, U., Böhm, K., Schek, H.-J., and Schuldt, H. 2002. FAS - A freshness-sensitive coordination middleware for a cluster of OLAP components. In Proceedings of International Conference on Very Large Data Bases (VLDB), 754--765. Google ScholarDigital Library
- ]]Schenkel, R., Weikum, G., Weißenberg, N., and Wu, X. 1999. Federated transaction management with snapshot isolation. In Proceedings of the International Workshop on Foundations of Models and Languages for Data and Objects (FMLDO) - Selected articles, 1--25. Google ScholarDigital Library
- ]]Weikum, G. and Vossen, G. 2001. Transactional Information Systems. Morgan Kaufmann, Chapter 6. Google ScholarDigital Library
- ]]Wu, S. and Kemme, B. 2005. Postgres-R(SI): Combining replica control with concurrency control based on snapshot isolation. In Proceedings of the IEEE International Conference on Data Engineering (ICDE), 422--433. Google ScholarDigital Library
Index Terms
- Snapshot isolation and integrity constraints in replicated databases
Recommendations
Serializable isolation for snapshot databases
Many popular database management systems implement a multiversion concurrency control algorithm called snapshot isolation rather than providing full serializability based on locking. There are well-known anomalies permitted by snapshot isolation that ...
A critique of snapshot isolation
EuroSys '12: Proceedings of the 7th ACM european conference on Computer SystemsThe support for transactions is an essential part of a database management system (DBMS). Without this support, the developers are burdened with ensuring atomic execution of a transaction despite failures as well as concurrent accesses to the database ...
Transaction Management Using Causal Snapshot Isolation in Partially Replicated Databases
SRDS '14: Proceedings of the 2014 IEEE 33rd International Symposium on Reliable Distributed SystemsWe present here a transaction management protocol using causal snapshot isolation in partially replicated multi-version databases. We consider here replicated databases consisting of multiple disjoint data partitions. A partition is not required to be ...
Comments