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., the workload cannot contain 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 commit consensus is no longer needed to prepare 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相当。