C5: Cloned Concurrency Control That Always Keeps Up

C5: Cloned Concurrency Control That Always Keeps Up
复制标题

DOI:
10.14778/3561261.3561262
复制
发表时间:
2022-07
期刊:
Proc. VLDB Endow.
影响因子:
--
通讯作者:
Jeffrey Helt;Abhinav Sharma;D. Abadi;Wyatt Lloyd;Jose M. Faleiro
Jeffrey Helt;Abhinav Sharma;D. Abadi;Wyatt Lloyd;Jose M. Faleiro
中科院分区:
其他
文献类型:
--
作者:
Jeffrey Helt;Abhinav Sharma;D. Abadi;Wyatt Lloyd;Jose M. Faleiro

文献摘要

相似文献

通常部署异步复制的主备份数据库,以提高可用性和卸载只读事务。为了应用来自主服务器的复制写操作并提供只读事务,备份实现了克隆的并发控制协议。该协议确保只读事务始终返回先前存在于主服务器上的状态快照。这迫使备份精确地复制由主服务器的并发控制产生的提交顺序。现有的克隆并发控制协议通过限制备份的并行性来保证这一点。因此,主服务器的并发控制以比这些协议更高的并行性执行某些工作负载。在本文中,我们证明了这种并行性差距会导致无限的复制延迟,在这种情况下,写操作可能需要很长时间才能复制到备份,从而导致生产系统中的灾难性故障。然后我们设计了C5,这是第一个提供有限复制延迟的克隆并发协议。我们实现了两个版本的C5:我们在MyRocks(一个广泛部署的数据库)中的评估表明,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.