Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failover and reverse #35

Open
hgqislub opened this issue Feb 27, 2017 · 0 comments
Open

failover and reverse #35

hgqislub opened this issue Feb 27, 2017 · 0 comments
Assignees

Comments

@hgqislub
Copy link
Contributor

hgqislub commented Feb 27, 2017

一、参考BCManager(V3存储)主备场景

1. 计划性迁移Failover

暂停主卷业务IO-->调用sync手动发起主从同步-->分裂复制卷-->将从卷变成可读写-->业务IO下发到从卷

2. 计划性迁移Reverse

从卷升主-->原主卷降备-->修改备为只读-->调用sync手动发起主从同步(增量)

3. Crash场景下Failover

分裂复制卷-->将从卷变成可读写-->业务IO下发到从卷

4. Crash场景下Reverse

从卷升主-->恢复原主卷服务-->原主卷降备-->修改备为只读-->调用sync手动发起主从同步(全同步)

Crash场景下有数据丢失风险

二、Todo List

1. crash场景,主节点状态刷新

主节点crash之后,控制面下发failover命令,从节点变成“failed-over”状态,权限变成可读写,对外提供服务。然而主节点被重新拉起后,状态依然是“enabled”状态,将尝试向从节点同步数据。
此时需要做以下处理:

  • 从节点在"failed-over"状态需要拒绝主节点的同步数据请求,可以通过failover命令触发拒绝请求断开replication链接,或者正常io路径中插入检查"failed-over"状态的代码。
  • 主节点被重新拉起后,需手动调用sync_status()接口,强制同步主节点的状态为"failed-over"状态。

2. reverse场景

尚未开发代码

3. 主从同步时基线确定

在failover和reverse场景中,进行主从同步都优先采用“基于快照基线的增量同步”方式,开发check_snapshot_base() 接口。如果不存在数据基线,则采用全同步的方式同步数据。

@hgqislub hgqislub self-assigned this Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant