解决金仓数据库KingbaseES使用--force-rewind强制拉起备机时,时间线不吻合的问题

 

问题描述


当集群状态如下:
1 | node1 | standby | ! running as primary | | default | 100 | 5 | user=esrep dbname=esrep port=54356 host=10.10.8.43 connect_timeout=10 keepalives=1 keepalives_idle=10 keepalives_interval=1 keepalives_count=3
2 | node2 | primary | * running | | default | 100 | 4 | user=esrep dbname=esrep port=54356 host=10.10.8.44 connect_timeout=10 keepalives=1 keepalives_idle=10 keepalives_interval=1 keepalives_count=3
需要将备机停止数据库,使用--force-rewind强制拉起重新加入到集群中,使用如下命令
./repmgr node rejoin -Uesrep -d esrep -h 10.10.8.44 -p 54356 --force-rewind
出现错误信息如下:
ERROR: this node's timeline is ahead of the rejoin target node's timelineDETAIL: this node's timeline is 5, rejoin target node's timeline is 4

原因分析


因为备机出现故障,导致时间线出现变化,状态发生变化后,时间线加1。导致备机的时间线比主机的高。按理说集群应该主机的时间线是最新的,否则会导致数据差异。
 

解决方案

添加参数--no-check-wal 强制拉起。命令如下:

./repmgr node rejoin -Uesrep -d esrep -h 10.10.8.44 -p 54356 --force-rewind --no-check-wal

参考资料

更多金仓数据库KingbaseES信息,详见 KingbaseES官方手册




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值