bitflicker64 opened a new issue, #2959: URL: https://github.com/apache/hugegraph/issues/2959
### Bug Type (问题类型) others (please edit later) ### Before submit - [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents) ### Environment (环境信息) - Server Version: 1.7.0 - Backend: hstore (3 PD + 3 Store + 3 Server) - OS: macOS Apple M4 - Network: Docker bridge mode (static IPs via ipam) - Docker Desktop: latest ### Expected & Actual behavior (期望与实际表现) Expected: 3-node cluster works correctly regardless of which PD node wins raft leader election. Actual: Cluster only works when pd0 wins leader election. If pd1 or pd2 becomes leader, store registration fails silently, partitions are never distributed (partitionCount:0 on store1 and store2), and HugeGraph servers are stuck in DEADLINE_EXCEEDED loop indefinitely. Root cause: In RaftEngine.java, getLeaderGrpcAddress() makes a live bolt RPC call to discover the leader's gRPC address when the current node is a follower. This call fails in Docker bridge mode — CompletableFuture.get() returns null → NPE → redirectToLeader() fails → store registration never completes. Error in logs: ERROR RaftRpcClient - failed to call rpc to 172.20.0.12:8610. null java.util.concurrent.ExecutionException: java.lang.NullPointerException at RaftEngine.getLeaderGrpcAddress(RaftEngine.java:242) at PDService.redirectToLeader(PDService.java:1275) at PDService.getMembers(PDService.java:973) Proposed fix: derive the leader's gRPC address from local config instead of making a bolt RPC call: ```java public String getLeaderGrpcAddress() { if (isLeader()) { return config.getGrpcAddress(); } if (raftNode.getLeaderId() == null) { waitingForLeader(10000); } String leaderIp = raftNode.getLeaderId().getEndpoint().getIp(); int grpcPort = config.getGrpcPort(); return leaderIp + ":" + grpcPort; } ``` Related PR: #[your PR number] ### Vertex/Edge example (问题点 / 边数据举例) ```javascript ``` ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构) ```javascript ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
