前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >eXtremeDB HA synchronization procedure

eXtremeDB HA synchronization procedure

作者头像
全栈程序员站长
发布2022-09-27 16:00:36
4050
发布2022-09-27 16:00:36
举报
文章被收录于专栏:全栈程序员必看

Here is the description of synchronization procedure:

1. Masterand replica databases have a ha_sequencer – 64bit integer which is initializedby zero at startup.

2. Masterincrements the sequencer at each commit of a WRITE transaction and sends thesequencer value along with transaction data to the replica(s)

3. Ifthe replica successfully applies the received transaction, it sets itssequencer to the received value. So after the transaction was committed, thevalues of the ha_sequencer are the same on the master and replica.

4. Whenthe replica connects to the master, it sends the value of ha_sequencer. Mastercompare its own value with received one. If values are equal, this means thatthe master and replica have the same database version and no synchronization isrequired – replica reports MCO_REPL_NOTIFY_DB_EQUAL notification code.

5. Otherwise(if master’s and replica’s sequencer values are different), the masterinitiates the synchronization procedure depending on the mode_flags – static,hot-sync or stateful initialization.

So, the DB_EQUAL code means that the values ofha_sequencers on the master and replica are equal. If the replica’s database isin-memory and newly created, the replica’s sequencer is 0. This means that themaster’s sequencer is also 0. But this is possible only if the master didn’tperform write transactions since creation of the database.

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/184407.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档