Two-phase-commit (2PC) has been widely adopted for distributed transaction processing, but it also jeopardizes throughput by introducing two rounds of network communications and two durable log writes to a transaction's critical path. Despite the various proposals that eliminate 2PC such as deterministic database and access localization, 2PC remains the de facto standard since the alternatives often lack generality (e.g., requiring workloads without branches based on query results). In this paper, we present Primo, a distributed transaction protocol that supports a more general set of workloads without 2PC. Primo features write-conflict-free concurrency control that guarantees once a transaction enters the commit phase, no concurrency conflict (e.g., deadlock) would occur when installing the write-set -- hence the prepare phase is no longer needed to account for any potential conflict from any partition. In addition, Primo further optimizes the transaction path using asynchronous group commit. With that, the durability delay is also taken off the transaction's critical path. Empirical results on Primo are encouraging -- in YCSB and TPC-C, Primo attains 1.42x to 8.25x higher throughput than state-of-the-art general protocols including Sundial and COCO, while having similar latency as COCO which also employs group commit.
翻译:两阶段提交(2PC)已被广泛用于分布式事务处理,但它通过在事务关键路径中引入两轮网络通信和两次持久化日志写入而损害了吞吐量。尽管存在消除2PC的各种方案(如确定性数据库和访问本地化),2PC仍是事实上的标准,因为替代方案通常缺乏通用性(例如要求工作负载不包含基于查询结果的分支)。本文提出Primo,一种支持更通用工作负载且无需2PC的分布式事务协议。Primo采用无写冲突的并发控制机制,确保一旦事务进入提交阶段,安装写集时不会发生并发冲突(如死锁)——因此无需为处理来自任何分区的潜在冲突而保留准备阶段。此外,Primo利用异步组提交进一步优化事务路径,从而将持久化延迟也从事务关键路径中移除。Primo的实验结果令人鼓舞——在YCSB和TPC-C基准测试中,Primo的吞吐量比包括Sundial和COCO在内的现有最先进通用协议高1.42至8.25倍,同时延迟与同样采用组提交的COCO相当。