华东师范大学学报(自然科学版) ›› 2020, Vol. 2020 ›› Issue (5): 10-20.doi: 10.3969/j.issn.1000-5641.202091002

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

多主云数据库的全局事务日志

卫孝贤, 刘文欣, 蔡鹏   

  1. 华东师范大学 数据科学与工程学院, 上海 200062
  • 收稿日期:2020-08-02 发布日期:2020-09-24
  • 通讯作者: 蔡鹏,男,研究员,博士生导师,研究方向为数据库.E-mail:pcai@dase.ecnu.edu.cn E-mail:pcai@dase.ecnu.edu.cn
  • 基金资助:
    国家自然科学基金(61972149)

Global transaction log of a multi-master cloud database

WEI Xiaoxian, LIU Wenxin, CAI Peng   

  1. School of Data Science and Engineering, East China Normal University, Shanghai 200062, China
  • Received:2020-08-02 Published:2020-09-24

摘要: 随着云计算的盛行, 用户对云数据库的需求越发复杂, 而当下基于共享存储的一写多读的云数据库系统并不能支持写性能的动态扩展. 多个主节点同时提供写服务, 会引起跨节点的读写冲突, 进而导致多主节点缓存不一致. 对于这个问题, 基于全局有序的事务日志的乐观冲突检测可以检测出跨节点事务冲突, 并回滚冲突的事务, 维持整个系统的隔离级别与一致性. 另外, 通过广播和回放全局有序的事务日志, 可以将主节点的修改同步到其余节点, 保证每个节点的独立服务能力. 这一基于事务日志的多主缓存一致性解决方案已实现在开源数据库MySQL上,并通过实验验证了该解决方案对系统性能的影响.

关键词: 云数据库, 多主缓存, 事务日志

Abstract: With the prevalence of cloud computing, users’ requirements for cloud databases are becoming increasingly complex. The current write-once-read-many cloud database system, based on shared storage, cannot support the dynamic expansion of write performance. Multiple master nodes provide write services simultaneously, which can cause cross-node read and write conflicts, eventually leading to inconsistencies in the cache of multiple master nodes. For this problem, optimistic conflict detection based on globally ordered transaction logs can detect cross-node transaction conflicts, roll back conflicting transactions, and maintain the isolation level and consistency of the overall system. By broadcasting and replaying the global orderly transaction log, moreover, the modification of the master node can be synchronized to the remaining nodes to ensure the independent service capability of each individual node. This multi-master cache consistency solution based on global transaction logs is implemented on the open source database MySQL, and the impact on system performance is verified through experiments.

Key words: cloud database, multi-master cache, transaction log

中图分类号: