incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

remove store1, but the store within the store cluster will still be related to store1

Open hexuxu110 opened this issue 3 months ago • 3 comments

Bug Type (问题类型)

None

Before submit

  • [x] 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.5.0 (Apache Release Version)
  • Backend: Hstore
  • OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
  • Data Size: xx vertices, xx edges

Expected & Actual behavior (期望与实际表现)

store集群内的 raft-hugegraph-store.log报错 2025-08-27 15:13:06 [Append-Entries-Thread-Send12] [WARN] c.a.s.j.c.Replicator - Fail to issue RPC to store1, consecutiveErrorTimes=434661, error=Status[EINTERNAL<1004>: Check connection[10.15.69.52:8510] fail and try to create new one] 但我的使用pd查询store集群里面已经没有store1的信息了 curl --location --request GET 'http://127.0.0.1:8620/v1/stores'。是不是数据更新不一致啊

Vertex/Edge example (问题点 / 边数据举例)


Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)


hexuxu110 avatar Aug 27 '25 07:08 hexuxu110

你的情况很可能是因为 Raft 协议的状态同步延迟或清理不完全导致的。HugeGraph 的 store 节点移除分为两步:一是 PD 元数据更新,二是 Raft 集群成员变更。即使 PD 查询不到 store1,Raft 层如果没有及时同步或有网络分区、RPC 重试等异常,其他节点仍可能尝试与 store1 通信,导致 raft-hugegraph-store.log 持续报错。这在分布式系统中是常见现象,尤其是在 HugeGraph 1.5.0 版本下,移除 HStore 节点后集群可能会出现不可用或异常 RPC 错误的情况,且 initial-store-count 配置也无法避免此问题 相关讨论

建议你:

  1. 检查所有 PD 节点的 raft.peers-list、address、data-path 配置是否一致,确保网络互通;
  2. 查看 PD 节点日志,确认 Raft 状态是否有异常或警告;
  3. 给集群一些时间让 Raft 状态收敛,如果长时间不恢复,可以尝试重启异常的 PD 节点或整个集群;
  4. 如果依然有问题,考虑手动触发 Raft 成员变更或清理残留节点配置。

这种现象在 Raft 协议下属于正常,但如果持续报错影响业务,建议优先排查配置和网络,并关注后续版本的优化 相关说明

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Aug 27 '25 07:08 dosubot[bot]

@dosu 如何手动触发 Raft 成员变更或清理残留节点配置

hexuxu110 avatar Aug 27 '25 07:08 hexuxu110

手动触发 HugeGraph HStore Raft 成员变更和清理残留节点,推荐流程如下:

  1. 通过 PD 的 REST API 删除节点:
    执行 DELETE /v1/store/{storeId},这会在 Raft 集群中移除指定 Store 节点并同步成员信息。如果节点已被 PD 移除但 Raft 层还报错,说明状态未完全收敛 参考

  2. 检查所有 PD 和 Store 节点的配置(如 initial-store-list、raft peers-list、端口、IP)必须完全一致,且网络互通。部分遗留参数(如 server.role、server.id)在 HStore+PD 场景下已废弃,建议彻底移除 参考

  3. 用 REST API 查询 Raft 状态,确认成员变更是否生效:

    • 查询所有 Raft 节点:GET /graphs/{graph}/raft/list_peers
    • 查询当前 leader:GET /graphs/{graph}/raft/get_leader
      需带 HTTP Basic Auth 参考
  4. 如日志持续报错或状态长时间不收敛,可尝试重启异常 PD 节点或整个集群,促使 Raft 状态收敛 参考

  5. 移除或变更节点后,HugeGraph 1.5.0 不会自动分配分区,需手动调用 PD 的 /partition/dispatch API 触发分区分配,保证数据一致性和查询正常 参考

如以上操作后仍有残留节点报错,说明 Raft 元数据清理或成员变更流程可能存在 bug,可关注相关 issue 和后续版本修复动态。

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Aug 27 '25 07:08 dosubot[bot]