arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2505.18409cs.DBcs.PL
收藏

关于检查 SQL 事务混合隔离级别的复杂度

On the Complexity of Checking Mixed Isolation Levels for SQL Transactions

Ahmed Bouajjani, Constantin Enea, Enrique Román-Calvo

AI总结:

本文研究了同时使用多种隔离级别的 SQL 事务执行正确性检查问题,证明了该问题的多个受限版本为 NP 完全,并提出了一种兼顾最坏情况指数时间、相关情况多项式时间及实际高效的验证算法。

摘要:

对数据库的并发访问通常被分组在事务中,这些事务定义了应与其他并发计算隔离并能抵御故障的工作单元。现代数据库为事务提供不同级别的隔离,这对应于一致性和吞吐量之间的不同权衡。通常,应用程序可以同时使用具有不同隔离级别的事务。在这项工作中,我们研究了测试数据库中隔离级别实现的问题,即检查由多个事务组成的给定执行是否遵循了规定的隔离级别语义。我们特别关注由 SQL 查询组成的事务以及同时使用多个隔离级别的情况。我们证明该问题的许多限制是 NP 完全的,并提供了一种在最坏情况下呈指数时间、在相关情况下呈多项式时间且实际高效的算法。

英文摘要:

Concurrent accesses to databases are typically grouped in transactions which define units of work that should be isolated from other concurrent computations and resilient to failures. Modern databases provide different levels of isolation for transactions that correspond to different trade-offs between consistency and throughput. Quite often, an application can use transactions with different isolation levels at the same time. In this work, we investigate the problem of testing isolation level implementations in databases, i.e., checking whether a given execution composed of multiple transactions adheres to the prescribed isolation level semantics. We particularly focus on transactions formed of SQL queries and the use of multiple isolation levels at the same time. We show that many restrictions of this problem are NP-complete and provide an algorithm which is exponential-time in the worst-case, polynomial-time in relevant cases, and practically efficient.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑