Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Making snapshot isolation serializable

Published: 01 June 2005 Publication History

Abstract

Snapshot Isolation (SI) is a multiversion concurrency control algorithm, first described in Berenson et al. [1995]. SI is attractive because it provides an isolation level that avoids many of the common concurrency anomalies, and has been implemented by Oracle and Microsoft SQL Server (with certain minor variations). SI does not guarantee serializability in all cases, but the TPC-C benchmark application [TPC-C], for example, executes under SI without serialization anomalies. All major database system products are delivered with default nonserializable isolation levels, often ones that encounter serialization anomalies more commonly than SI, and we suspect that numerous isolation errors occur each day at many large sites because of this, leading to corrupt data sometimes noted in data warehouse applications. The classical justification for lower isolation levels is that applications can be run under such levels to improve efficiency when they can be shown not to result in serious errors, but little or no guidance has been offered to application programmers and DBAs by vendors as to how to avoid such errors. This article develops a theory that characterizes when nonserializable executions of applications can occur under SI. Near the end of the article, we apply this theory to demonstrate that the TPC-C benchmark application has no serialization anomalies under SI, and then discuss how this demonstration can be generalized to other applications. We also present a discussion on how to modify the program logic of applications that are nonserializable under SI so that serializability will be guaranteed.

References

[1]
Adya, A., Liskov, B., and O'Neil, P. 2000. Generalized isolation level definitions. In Proceedings of IEEE International Conference on Data Engineering, (Feb.) IEEE Computer Society Press, Los Alamitos, Calif., 67--78.
[2]
Anderson, T., Bretbart, Y., Korth, H., and Wool, A. 1998. Replication, consistency and practicality: are these mutually exclusive? In Proceedings of the ACM SIGMOD International Conference on Management of Data (June). ACM, New York, 484--495.
[3]
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 (June) ACM, New York, 1--10.
[4]
Berge, C. 1976. Graphs and Hypergraphs (2nd edition). North-Holland Mathematical Library, Volume 6.
[5]
Bernstein, P., Hadzilacos, V., and Goodman, N. 1987. Concurrency Control and Recovery in Database Systems. Addison-Wesley. (This text is now out of print but can be downloaded from http://research.microsoft.com/pubs/ccontrol/default.htm)
[6]
Bernstein, A., Lewis, P., and Lu, S. 2000. Semantic conditions for correctness at different isolation levels. In Proceedings of IEEE International Conference on Data Engineering (Feb.). IEEE Computer Society Press, Los Alamitos, Calif., 57--66.
[7]
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 (June). ACM, New York, 97--108.
[8]
Chamberlin, D., Astrahan, M., Blasgen, M., Gray, J., King, W., Lindsay, B., Lorie, R., Mehl, J., Price, T., Putzolu, F., Selinger, P., Schkolnick, M., Slutz, D., Traiger, I., Wade, B., and Yost, R. 1981. A history and evaluation of System R. Commun. ACM 24, 10 (Oct.). 632--646. (Also in: M. Stonebraker and J. Hellerstein, Readings in Database Systems, Third Edition, Morgan Kaufmann 1998.)
[9]
Elnikety, S., Pedone, F., and Zwaenepoel, W. 2004. Generalized snapshot isolation and a prefix-consistent implementation. Tech. Rep. IC/2004/21, EPFL, Mar.
[10]
Eswaran, K., Gray, J., Lorie, R., and Traiger, I. 1976. The notions of consistency and predicate locks in a database system. Commun. ACM 19, 11 (Nov.), 624--633.
[11]
Fekete, A. 1999. Serializability and snapshot isolation. In Proceedings of the Australian Database Conference (Auckland, New Zealand, Jan.). 201--210.
[12]
Fekete, A., O'Neil, E., and O'Neil, P. 2004. A read-only transaction anomaly under snapshot isolation. ACM SIGMOD Record 33, 3 (Sept.), 12--14.
[13]
Gray, J. (Ed.). 1993. The Benchmark Handbook (2nd edition). Morgan-Kaufmann, San Francisco, Calif.
[14]
Gray, J. and Reuter, A. 1993. Transaction Processing: Concepts and Techniques. Morgan-Kaufmann, San Francisco, Calif.
[15]
Gray, J., Helland, P., O'Neil, P., and Shasha, D. 1996. The dangers of replication and a solution. In Proceedings of the ACM SIGMOD International Conference on Management of Data (June). ACM, New York, 173--182.
[16]
Jacobs, K., Bamford, R., Doherty, G., Haas, K., Holt, M., Putzolu, F., and Quigley, B. 1995. Concurrency Control: Transaction Isolation and Serializability in SQL92 and Oracle7. Oracle White Paper, Part No. A33745 (July).
[17]
Liarokapis, D. 2001. Testing Isolation Levels of Relational Database Management Systems, Ph.D. dissertation, University of Massachusetts, Boston, Mass. (Dec.). (This thesis can be downloaded from http://www.cs.umb.edu/~dimitris/thesis/thesisDec20.pdf.)
[18]
Papadimitriou, C. 1986. The Theory of Database Concurrency Control. Computer Science Press.
[19]
Shasha, D. and Bonnet, P. 2002. Database Tuning: Principles, Experiments, and Troubleshooting Techniques. Morgan-Kaufmann, San Francisco, Calif.
[20]
Shasha, D., Llirbat, F., Simon, E., and Valduriez, P. 1995. Transaction chopping: Algorithms and performance studies. ACM Trans. Datab. Syst. 20, 3 (Sept.), 325--363.
[21]
Schenkel, R. and Weikum, G. 2000. Integrating snapshot isolation into transactional federations. In Proceedings of 5th IFCIS International Conference on Cooperative Information Systems (CoopIS 2000) (Sept.), 90--101.
[22]
TPC-C Benchmark Specification, available at http://www.tpc.org/tpcc/.

Cited By

View all
  • (2024)Allocating Isolation Levels to Transactions in a Multiversion SettingACM SIGMOD Record10.1145/3665252.366525753:1(16-23)Online publication date: 14-May-2024
  • (2024)When View- and Conflict-Robustness Coincide for Multiversion Concurrency ControlProceedings of the ACM on Management of Data10.1145/36515922:2(1-16)Online publication date: 14-May-2024
  • (2024)DBStorm: Generating Various Effective Workloads for Testing Isolation LevelsProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680318(755-767)Online publication date: 11-Sep-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Database Systems
ACM Transactions on Database Systems  Volume 30, Issue 2
June 2005
328 pages
ISSN:0362-5915
EISSN:1557-4644
DOI:10.1145/1071610
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 2005
Published in TODS Volume 30, Issue 2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Concurrency control
  2. anomaly
  3. consistency
  4. multiversion concurrency
  5. serializability
  6. snapshot isolation
  7. weak isolation

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)161
  • Downloads (Last 6 weeks)33
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Allocating Isolation Levels to Transactions in a Multiversion SettingACM SIGMOD Record10.1145/3665252.366525753:1(16-23)Online publication date: 14-May-2024
  • (2024)When View- and Conflict-Robustness Coincide for Multiversion Concurrency ControlProceedings of the ACM on Management of Data10.1145/36515922:2(1-16)Online publication date: 14-May-2024
  • (2024)DBStorm: Generating Various Effective Workloads for Testing Isolation LevelsProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680318(755-767)Online publication date: 11-Sep-2024
  • (2024)Toward High-Performance Blockchain System by Blurring the Line between Ordering and ExecutionProceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis10.1109/SC41406.2024.00033(1-16)Online publication date: 17-Nov-2024
  • (2024)Read-safe snapshots: An abort/wait-free serializable read method for read-only transactions on mixed OLTP/OLAP workloadsInformation Systems10.1016/j.is.2024.102385124(102385)Online publication date: Sep-2024
  • (2024)Transaktionale Semantik für global verteilte AnwendungenSchnelles und skalierbares Cloud-Datenmanagement10.1007/978-3-031-54388-3_6(141-159)Online publication date: 3-May-2024
  • (2024)EPO‐R: An efficient garbage collection scheme for long‐term transactionsConcurrency and Computation: Practice and Experience10.1002/cpe.813436:17Online publication date: 4-May-2024
  • (2023)ScalarDB: Universal Transaction Manager for PolystoresProceedings of the VLDB Endowment10.14778/3611540.361156316:12(3768-3780)Online publication date: 1-Aug-2023
  • (2023)When is it safe to run a transactional workload under Read Committed?ACM SIGMOD Record10.1145/3604437.360444652:1(36-43)Online publication date: 8-Jun-2023
  • (2023)Dynamic Partial Order Reduction for Checking Correctness against Transaction Isolation LevelsProceedings of the ACM on Programming Languages10.1145/35912437:PLDI(565-590)Online publication date: 6-Jun-2023
  • Show More Cited By

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media