论文标题
C5:克隆的并发控制始终保持
C5: Cloned Concurrency Control that Always Keeps Up
论文作者
论文摘要
通常部署异步复制的主要后返回数据库,以提高可用性和卸载仅阅读交易。为了使用初级的重复写入并提供仅读取交易,备份实现了克隆的并发控制协议。该协议确保仅阅读交易始终返回先前存在于主要的状态的快照。这迫使备份准确地复制由主的并发控制产生的提交顺序。现有的克隆并发控制协议通过限制备份的并行性来保证这一点。结果,主要的并发控制与这些协议相比,具有更多并行性的工作负载。在本文中,我们证明这种并行性差距导致无限的复制滞后,在此过程中,写作可以任意花费很长时间才能复制到备份,这导致了生产系统中的灾难性故障。然后,我们设计C5,这是第一个克隆的并发协议,以提供有限的复制滞后。我们在Myrocks中实施了两个版本的C5:我们的评估是一个广泛部署的数据库,证明C5提供了有界的复制滞后。我们在最近的一个内存数据库CICADA的评估表明,C5甚至可以跟上最快的初选。
Asynchronously replicated primary-backup databases are commonly deployed to improve availability and offload read-only transactions. To both apply replicated writes from the primary and serve read-only transactions, the backups implement a cloned concurrency control protocol. The protocol ensures read-only transactions always return a snapshot of state that previously existed on the primary. This compels the backup to exactly copy the commit order resulting from the primary's concurrency control. Existing cloned concurrency control protocols guarantee this by limiting the backup's parallelism. As a result, the primary's concurrency control executes some workloads with more parallelism than these protocols. In this paper, we prove that this parallelism gap leads to unbounded replication lag, where writes can take arbitrarily long to replicate to the backup and which has led to catastrophic failures in production systems. We then design C5, the first cloned concurrency protocol to provide bounded replication lag. We implement two versions of C5: Our evaluation in MyRocks, a widely deployed database, demonstrates C5 provides bounded replication lag. Our evaluation in Cicada, a recent in-memory database, demonstrates C5 keeps up with even the fastest of primaries.