论文标题
COO:交易数据库的一致性检查
Coo: Consistency Check for Transactional Databases
论文作者
论文摘要
在现代数据库中,交易处理技术提供了酸(原子能,一致性,隔离,耐用性)功能。一致性是指数据库的正确性,并且是许多应用程序(例如金融和银行服务)的关键属性。但是,存在一致性的典型挑战。从理论上讲,当前一致性的两个定义表达了完全不同的含义,这些含义是因果关系,有时是有争议的。实际上,检查数据库的一致性是臭名昭著的,尤其是在验证成本方面。本文提出了COO,该框架是检查数据库一致性的框架。具体而言,首席运营官具有以下进步。首先,COO提出了部分订单对(POP)图,该图在时间表中对交易冲突具有更好的表现力,通过考虑诸如Commit and Drop之类的状态信息。通过无周期的流行图,COO完全定义了一致性。其次,首席运营官可以基于流行循环构建不一致的测试用例。这些测试用例可用于检查数据库的一致性(所有类型的异常),用户友好(基于SQL的测试)以及具有成本效益(以几分钟的方式进行一次性检查)。我们在所有受支持的隔离水平下使用11个集中和分布的11个数据库评估COO。评估表明,数据库并未完全遵循ANSI SQL标准(例如,声称可以序列化但在某些不一致的情况下出现的Oracle),并且具有不同的实现方法和行为的并发控制方法(例如,PostgResQL,MySQL,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.