记一次redis cluster delete node失败

1、6611 的 slot 5731 move失败。 redis-cluster在reshard时失败,提示信息如下:
All nodes agree about slots configuration.

Check for open slots...
Node 172.28.192.84:6430 has slots in importing state (5731).

Node 172.28.192.98:6611 has slots in migrating state (5731).
The following slots are open: 5731
Check slots coverage...
All 16384 slots covered.
Please fix your cluster problems before resharding

slot 5731由于reshard失败,在6430上显示正在import,6611上显示正在migrate。
redis cluster在reshard、rebalance等操作时会执行check_cluster方法检查集群是否健康,只有健康的集群才能进行迁移。
此时无法再继续reshard,需要先fix修复集群,通过下面命令:
redis-trib.rb fix 172.28.192.84:6424
修复完成后,再继续执行reshard即可。
那为何会出现slot migrate失败,查看172.28.192.98:6611 节点的redis.log信息,有如下报错
Moving slot 5731 from 172.28.192.98:6611 to 172.28.192.84:6430:
[ERR] IOERR error or timeout reading to target instance

Performing Cluster Check (using node 172.28.192.84:6430)

迁移过程中遇到超时错误“[ERR] Calling MIGRATE: IOERR error or timeout reading to target instance”,导致只完成部分,可能会造成数据丢失。
如果迁移的slots数量多,应当设置redis-trib.rb的超时参数--timeout值大一点,该参数默认是60s。(变更脚本中未设置,使用的默认值)

2、已经执行过del_node下线的节点,在clusternodes中还显示handshake或者fail,分析是节点移除异常。需要手动执行 forget {downnodeid} 移除cluster nodes中的信息。

3、应用无法再造数据,我这边正在跟开发沟通,确定下次再缩容前,应用数据已落地,或应用可接受数据丢失。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值