admin管理员组文章数量:1130349
问题描述
所有sentinel及master都down,5分钟后超过半数的sentinel才全部run起来,此时failover失败报错"NOGOODSLAVE No suitable slave to promote"
root cause
跟down-after-milliseconds配置相关,代码中如果slave记录的master失联的时间超过max_master_down_time(down-after-milliseconds*10+sentinel认为master sdown的时间间隔),那么该slave就不会被promote成master。
solution
该问题是redis-server的选主的机制问题,这样设计的原因可能是认为这样的slave数据跟master的一致性不好,升主之后数据丢失严重。产品或者业务可根据需要调大down-after-milliseconds。
源码:sentinel.c:sentinelSelectSlave
问题描述
所有sentinel及master都down,5分钟后超过半数的sentinel才全部run起来,此时failover失败报错"NOGOODSLAVE No suitable slave to promote"
root cause
跟down-after-milliseconds配置相关,代码中如果slave记录的master失联的时间超过max_master_down_time(down-after-milliseconds*10+sentinel认为master sdown的时间间隔),那么该slave就不会被promote成master。
solution
该问题是redis-server的选主的机制问题,这样设计的原因可能是认为这样的slave数据跟master的一致性不好,升主之后数据丢失严重。产品或者业务可根据需要调大down-after-milliseconds。
源码:sentinel.c:sentinelSelectSlave
本文标签: 报错failoverSentinelredispromote
版权声明:本文标题:redis通过sentinel failover报错“NOGOODSLAVE No suitable slave to promote” 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1763929170a2972342.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论