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

remove-data 后如何重新加入集群 #4

Closed
seanlook opened this issue Jun 7, 2022 · 1 comment
Closed

remove-data 后如何重新加入集群 #4

seanlook opened this issue Jun 7, 2022 · 1 comment
Labels
good question Good question question Further information is requested

Comments

@seanlook
Copy link

seanlook commented Jun 7, 2022

请假 2个问题:
假设 replication-factor = 2, consistency=one

  1. 模拟 1 datanode 故障,正常的节点会暂存 hinted handoff, 内部有健康检查机制吗,当故障节点恢复时,会继续写入,健康检查间隔是怎样的?
  2. 模拟 1 datanode 故障,如果执行了 remove-data 之后,想重新加入集群 add-data,influx-meta 还是无法感知到数据恢复
    在日志里看到 lvl=error msg="Failed to determine if node is active" log_id=0anK~crG000 service=handoff node=6 error="node not found", 实际 node 已经变成了10
    update-data 提示前后相同,也无效
@chengshiwen
Copy link
Owner

chengshiwen commented Jun 7, 2022

  1. hinted handoff 目前没有健康检查机制,但有重试机制,[hinted-handoff]retry-interval = "1s"retry-max-interval = "10s" 进行配置,retry-interval 表示写失败后 hinted handoff 尝试重写的时间间隔
  2. remove-data 后再 add-data,datanode 在 meta 元数据保存的 id 会自增变化,因此 remove-data 前如果该 datanode 写数据失败,remove-data 并 add-data 后,就会出现此类错误,正确用法应该是直接 update-data,请参考官方 influxdb enterprise 文档 Replace the old data node with the new data node。如果已经 remove-data,但还有 hinted handoff 数据没有写完,如果想要解决这个错误,有两个办法,找到 /var/lib/influxdb/hh 目录,把下面的 datanode id 改为新的 datanode id(如果你记得住新旧id对应关系),第二个办法,丢弃这部分数据,把 hh下面的目录清空

以上两个情况,和官方 influxdb enterprise 表现的行为一样,完全参考 官方 influxdb enterprise 进行编写

@chengshiwen chengshiwen added question Further information is requested good question Good question labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good question Good question question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants