Modern distributed databases face challenges in achieving transactional consistency across distributed partitions. Traditional two-phase commit (2PC) protocols incur high coordination overhead and latency, and require complex recovery for dynamic partition transfers. This paper introduces a novel tree-shaped 2PC framework for OceanBase that leverages single-machine log streams to address these challenges through three innovations. First, we propose log streams as atomic participants, replacing partition-level coordination. By treating each log stream as the commit unit, a transaction spanning $N$ co-located partitions interacts with one participant, reducing coordination overhead by orders of magnitude (e.g., 99 percent reduction for $N=100$). Second, we design a tree-shaped 2PC protocol with coordinator-rooted DAG topology that dynamically handles partition transfers by recursively constructing commit trees. When a partition migrates during a transaction, the protocol embeds migration contexts as leaf nodes, eliminating explicit participant list updates, resolving circular dependencies, and ensuring linearizable commits under topology changes. Third, we introduce prepare-unknown and trans-unknown states to prevent consistency violations when participants lose context. These states signal uncertainty during retries, avoiding erroneous aborts from so-called lying participants while isolating users from ambiguity. Experimental evaluation demonstrates performance approaching that of single-machine transactions, with reduced latency and bandwidth consumption, validating the framework's effectiveness for modern distributed databases.


翻译:现代分布式数据库在实现跨分布式分区的事务一致性方面面临挑战。传统的两阶段提交(2PC)协议存在协调开销高、延迟大等问题,且需要为动态分区转移设计复杂的恢复机制。本文提出一种面向OceanBase的新型树形2PC框架,该框架通过单机日志流技术,以三项创新应对这些挑战。首先,我们提出以日志流作为原子参与者,替代分区级协调机制。通过将每个日志流作为提交单元,一个跨越$N$个共置分区的事务仅需与一个参与者交互,使协调开销降低数个数量级(例如当$N=100$时减少99%)。其次,我们设计了基于协调器根节点有向无环图拓扑的树形2PC协议,该协议通过递归构建提交树动态处理分区转移。当事务执行期间发生分区迁移时,协议将迁移上下文嵌入为叶节点,从而消除显式的参与者列表更新,解决循环依赖问题,并确保拓扑变化下的线性化提交。第三,我们引入准备未知(prepare-unknown)和事务未知(trans-unknown)状态,防止参与者丢失上下文时出现一致性违例。这些状态在重试期间传递不确定性信号,避免因所谓“欺骗参与者”导致的错误中止,同时将用户与状态歧义隔离。实验评估表明,该框架在降低延迟和带宽消耗的同时,性能接近单机事务水平,验证了其对现代分布式数据库的有效性。

0
下载
关闭预览

相关内容

国家标准《信息技术云计算参考架构》
专知会员服务
36+阅读 · 2024年5月24日
《美国陆军统一数据参考架构》最新发布73页
专知会员服务
70+阅读 · 2024年4月1日
区块链扩展技术现状与展望
专知会员服务
29+阅读 · 2024年1月2日
Meta-Transformer:多模态学习的统一框架
专知会员服务
59+阅读 · 2023年7月21日
智能数据库学习型索引研究综述
专知会员服务
23+阅读 · 2023年1月14日
面向端边云协同架构的区块链技术综述
专知会员服务
49+阅读 · 2021年12月24日
数据库发展研究报告(2021年)
专知会员服务
50+阅读 · 2021年6月29日
阿里巴巴全球化架构设计挑战
InfoQ
36+阅读 · 2019年11月25日
分布式核心技术知识图谱,带走不谢
架构师之路
12+阅读 · 2019年9月23日
工行基于MySQL构建分布式架构的转型之路
炼数成金订阅号
15+阅读 · 2019年5月16日
使用 Canal 实现数据异构
性能与架构
20+阅读 · 2019年3月4日
tensorflow项目学习路径
北京思腾合力科技有限公司
10+阅读 · 2017年11月23日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
最新“指挥控制”领域出版物合集(简介)
专知会员服务
1+阅读 · 今天15:19
面向军事作战需求开发的人工智能(RAIMOND)
专知会员服务
3+阅读 · 今天15:13
软件定义多域战术网络:基础与未来方向(综述)
水下战战术决策中的气象与海洋预报(50页报告)
远程空中优势:新一代超视距导弹的兴起
专知会员服务
1+阅读 · 今天14:45
大语言模型溯因推理的统一分类学与综述
专知会员服务
0+阅读 · 今天12:07
相关VIP内容
国家标准《信息技术云计算参考架构》
专知会员服务
36+阅读 · 2024年5月24日
《美国陆军统一数据参考架构》最新发布73页
专知会员服务
70+阅读 · 2024年4月1日
区块链扩展技术现状与展望
专知会员服务
29+阅读 · 2024年1月2日
Meta-Transformer:多模态学习的统一框架
专知会员服务
59+阅读 · 2023年7月21日
智能数据库学习型索引研究综述
专知会员服务
23+阅读 · 2023年1月14日
面向端边云协同架构的区块链技术综述
专知会员服务
49+阅读 · 2021年12月24日
数据库发展研究报告(2021年)
专知会员服务
50+阅读 · 2021年6月29日
相关资讯
阿里巴巴全球化架构设计挑战
InfoQ
36+阅读 · 2019年11月25日
分布式核心技术知识图谱,带走不谢
架构师之路
12+阅读 · 2019年9月23日
工行基于MySQL构建分布式架构的转型之路
炼数成金订阅号
15+阅读 · 2019年5月16日
使用 Canal 实现数据异构
性能与架构
20+阅读 · 2019年3月4日
tensorflow项目学习路径
北京思腾合力科技有限公司
10+阅读 · 2017年11月23日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员