Detecting Isolation Bugs via Transaction Oracle Construction
Authors:
- 1 May 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1123-1135
Abstract
Transactions are used to maintain the data integrity of databases, and have become an indispensable feature in modern Database Management Systems (DBMSs). Despite extensive efforts in testing DBMSs and verifying transaction processing mechanisms, isolation bugs still exist in widely-used DBMSs when these DBMSs violate their claimed transaction isolation levels. Isolation bugs can cause severe consequences, e.g., incorrect query results and database states. In this paper, we propose a novel transaction testing approach, Transaction oracle construction (Troc), to automatically detect isolation bugs in DBMSs. The core idea of Troc is to decouple a transaction into independent statements, and execute them on their own database views, which are constructed under the guidance of the claimed transaction isolation level. Any divergence between the actual transaction execution and the independent statement execution indicates an isolation bug. We implement and evaluate Troc on three widely-used DBMSs, i.e., MySQL, MariaDB, and TiDB. We have detected 5 previously-unknown isolation bugs in the latest versions of these DBMSs.Keywords
Funding Information
- National Key R&D Program of China (2021YFB1716000)
- National Natural Science Foundation of China (62072444)
This publication has 36 references indexed in Scilit:
- Highly available transactionsProceedings of the VLDB Endowment, 2013
- Detecting Offline Transaction Concurrency ProblemsJournal of Software, 2012
- QAGen2007
- Performance of multiversion concurrency control algorithms in maintaining temporal consistency2002
- Databases and transaction processingACM SIGMOD Record, 2002
- A critique of ANSI SQL isolation levels1995
- Multiversion concurrency control—theory and algorithmsACM Transactions on Database Systems, 1983
- On optimistic methods for concurrency controlACM Transactions on Database Systems, 1981
- Analysis of locking policies in database management systemsCommunications of the ACM, 1980
- SEQUEL1976