Two-phase commit (2PC) is widely used in distributed databases to ensure the atomicity of distributed transactions. However, 2PC has two limitations. First, it requires two eager log writes on the critical path, which incurs significant latency. Second, when a coordinator fails, a participant may be blocked waiting for the coordinator's decision, leading to indefinitely long latency and low throughput. 2PC was originally designed for a shared-nothing architecture. We observe that the two problems above can be addressed in an emerging storage disaggregation architecture which provides compare-and-swap capability in the storage layer. We propose Cornus, an optimized 2PC protocol for Cloud DBMS with Storage Disaggregation. We present Cornus in detail with proofs and show how it addresses the two limitations in 2PC. We also deploy it on real storage services including Azure Blob Storage and Redis. Empirical evaluations show that Cornus can achieve up to 1.9x speedup in latency over 2PC.
翻译:两阶段承诺(2PC)在分布式数据库中广泛使用,以确保分布式交易的原子化。然而,2PC有两个限制。首先,它需要两个热心的日志在关键路径上写作,这需要大量潜伏。其次,如果协调员失败,参与者可能会被阻拦,等待协调员的决定,导致无限期的长时间悬浮和低输送量。2PC最初是为一个共享的无源结构设计的。我们发现,上述两个问题可以在一个新兴的储存分类结构中解决,该结构提供储存层的比较和吸附能力。我们提议Cornus,一个优化的2PC协议,用于储存分解的Cloud DBMS。我们向Cornus提供详细证据,并展示它如何解决2PC中的两个限制。我们还将它用于真正的储存服务,包括Azure Blob存储和Redis。我们从经验学角度评估显示,Cornus可以在2PC的悬浮度上达到1.9x加速速度。