arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2206.14602cs.DB
收藏

Coo:事务数据库的一致性检查

Coo: Consistency Check for Transactional Databases

Haixiang Li, Yuxing Chen, Xiaoyan Li

摘要:

在现代数据库中,事务处理技术提供了ACID(原子性、一致性、隔离性、持久性)特性。一致性是指数据库的正确性,对于许多应用程序(如金融和银行服务)来说是一个至关重要的属性。然而,在一致性方面存在着典型的挑战。从理论上讲,目前的两种一致性定义表达了相当不同的含义,这是因果关系,有时有争议。实际上,数据库的一致性检查是众所周知的,特别是在验证成本方面。本文提出了Coo,一个检查数据库一致性的框架。具体来说,Coo有以下进步。首先,Coo提出了偏序对(POP)图,它通过考虑提交和中止等状态信息,对调度中的事务冲突有更好的表达。Coo通过没有循环的POP图,完整地定义了一致性。其次,Coo可以基于POP循环构造不一致的测试用例。这些测试用例可以用于以准确(所有类型的异常),用户友好(基于SQL的测试)和成本有效(几分钟内一次性检查)的方式检查数据库的一致性。我们在所有支持的隔离级别下使用11个集中式和分布式数据库来评估Coo。评估表明,数据库没有完全遵循ANSI SQL标准(例如,Oracle声称是可序列化的,但出现在一些不一致的情况下),并且对并发控件有不同的实现方法和行为(例如,PostgreSQL、MySQL和SQL Server在可重复读取级别上的性能完全不同)。Coo有助于理解粗略级别之间的差距,发现更详细和完整的不一致行为。

英文摘要:

In modern databases, transaction processing technology provides ACID (Atomicity, Consistency, Isolation, Durability) features. Consistency refers to the correctness of databases and is a crucial property for many applications, such as financial and banking services. However, there exist typical challenges for consistency. Theoretically, the current two definitions of consistency express quite different meanings, which are causal and sometimes controversial. Practically, it is notorious to check the consistency of databases, especially in terms of the verification cost. This paper proposes Coo, a framework to check the consistency of databases. Specifically, Coo has the following advancements. First, Coo proposes partial order pair (POP) graph, which has a better expressiveness on transaction conflicts in a schedule by considering stateful information like Commit and Abort. By POP graph with no cycle, Coo defines consistency completely. Secondly, Coo can construct inconsistent test cases based on POP cycles. These test cases can be used to check the consistency of databases in accurate (all types of anomalies), user-friendly (SQL-based test), and cost-effective (one-time checking in a few minutes) ways. We evaluate Coo with eleven databases, both centralized and distributed, under all supported isolation levels. The evaluation shows that databases did not completely follow the ANSI SQL standard (e.g., Oracle claimed to be serializable but appeared in some inconsistent cases), and have different implementation methods and behaviors for concurrent controls (e.g., PostgreSQL, MySQL, and SQL Server performed quite differently at Repeatable Read level). Coo aids to comprehend the gap between coarse levels, finding more detailed and complete inconsistent behaviors.

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

↑