华东师范大学学报(自然科学版) ›› 2023, Vol. 2023 ›› Issue (5): 11-25.doi: 10.3969/j.issn.1000-5641.2023.05.002

• 数据库系统 • 上一篇    下一篇

数据同步机制自适应优化的HTAP数据库原型系统

俞融1, 杨攀飞2,*(), 王清帅1, 张蓉1   

  1. 1. 华东师范大学 数据科学与工程学院, 上海 200062
    2. 工业和信息化部电子第五研究所, 广州 511300
  • 收稿日期:2023-06-29 出版日期:2023-09-25 发布日期:2023-09-15
  • 通讯作者: 杨攀飞 E-mail:yangpanfei@ceprei.com
  • 基金资助:
    国家自然科学基金(62072179); 基础软硬件性能与可靠性测评工业和信息化部重点实验室开放课题; OceanBase联合实验室项目

An HTAP database prototype with an adaptive data synchronization

Rong YU1, Panfei YANG2,*(), Qingshuai WANG1, Rong ZHANG1   

  1. 1. School of Data Science and Engineering, East China Normal University, Shanghai 200062, China
    2. The Fifth Electronics Research Institute of the Ministry of Industry and Information Technology, Guangzhou 511300, China
  • Received:2023-06-29 Online:2023-09-25 Published:2023-09-15
  • Contact: Panfei YANG E-mail:yangpanfei@ceprei.com

摘要:

在HTAP (hybrid transactional and analytical processing)数据库中, 资源隔离和数据共享是一个难题, 虽然不同厂商通过不同的架构来实现资源隔离, 但是用户关注的新鲜度, 即OLTP (online transaction processing)和OLAP (online analytical processing)读写版本的差距, 由数据共享的一致性模型决定. 然而, 现有的HTAP数据库为了节约成本, 只应用单一一致性同步模型, 这与用户应用的多种一致性需求之间存在矛盾, 为了满足用户需求的最高一致性而采取向上兼容的方案降低了系统的整体性能. 通过构建新鲜度与性能权衡的代价模型, 提出了一致性切换算法和切换前后同步数据的处理策略, 实现了一个顺序一致性同步与线性一致性同步自适应切换的HTAP数据库原型系统, 使得无需调整HTAP架构, 即可支持不同一致性(新鲜度)需求的查询负载并实现系统性能的最大化, 最后对自适应切换的有效性也进行了实验验证.

关键词: HTAP数据库系统, 数据同步, 一致性模型, 自适应同步模式切换, 性能与新鲜度权衡

Abstract:

In HTAP (hybrid transactional and analytical processing) database, resource isolation and data sharing is a difficult problem. Although different vendors achieve resource isolation through different architectures, the freshness of user concerns, that is, the gap between online transactional processing (OLTP) write and online analytical processing (OLAP) read versions, is determined by the consistency model of data sharing. However, existing HTAP databases apply only one consistency synchronization model for an easy implementation, which is contradictory to the multiple consistency requirements of user applications, and the overall system performance is sacrificed for the highest consistency upward compatibility. In this paper, by constructing a cost model of freshness and performance tradeoff, proposing a consistency switching algorithm and a processing strategy for synchronized data before and after switching, and realizing an HTAP database prototype with adaptive switching between sequential consistency synchronization and linear consistency synchronization, which makes it possible to support query loads with different consistency (freshness) requirements and maximize the system performance without adjusting the HTAP architecture. The effectiveness of adaptive switching is also verified by extensive experiments.s of adaptive switching is also verified by extensive experiments.

Key words: HTAP database systems, data synchronization, consistency model, adaptive synchronization mode switching, performance and freshness trade off

中图分类号: