数据库系统中的协调避免(扩展版)
Coordination Avoidance in Database Systems (Extended Version)
摘要:
最小化并发执行操作之间的协调或阻塞通信是最大化数据库系统的可伸缩性、可用性和高性能的关键。但是,不受约束的无协调执行可能会损害应用程序的正确性或一致性。什么时候协调是正确的必要条件?可序列化事务的经典用法足以维护正确性,但并不是所有应用程序都必须使用,从而牺牲了潜在的可伸缩性。在本文中,我们开发了一个正式的框架,不变的汇合,确定一个应用程序是否需要协调正确的执行。通过对数据库状态上的应用级不变量进行操作(例如,完整性约束),不变汇流分析提供了安全、无协调执行的充分必要条件。当程序员指定他们的应用程序不变量时,这种分析允许数据库仅在可能违反不变量的异常情况下进行协调。我们分析了来自真实世界数据库系统的常见不变量和操作的不变量汇合(即,完整性约束)和应用程序,并表明许多是不变的融合,因此可以实现没有协调。我们将这些结果应用于概念验证的协调避免数据库原型,并证明了相当大的性能增益相比,串行化执行,特别是25倍的改进比以前的TPC-C新秩序的性能在200台服务器集群。
英文摘要:
Minimizing coordination, or blocking communication between concurrently executing operations, is key to maximizing scalability, availability, and high performance in database systems. However, uninhibited coordination-free execution can compromise application correctness, or consistency. When is coordination necessary for correctness? The classic use of serializable transactions is sufficient to maintain correctness but is not necessary for all applications, sacrificing potential scalability. In this paper, we develop a formal framework, invariant confluence, that determines whether an application requires coordination for correct execution. By operating on application-level invariants over database states (e.g., integrity constraints), invariant confluence analysis provides a necessary and sufficient condition for safe, coordination-free execution. When programmers specify their application invariants, this analysis allows databases to coordinate only when anomalies that might violate invariants are possible. We analyze the invariant confluence of common invariants and operations from real-world database systems (i.e., integrity constraints) and applications and show that many are invariant confluent and therefore achievable without coordination. We apply these results to a proof-of-concept coordination-avoiding database prototype and demonstrate sizable performance gains compared to serializable execution, notably a 25-fold improvement over prior TPC-C New-Order performance on a 200 server cluster.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。