haohao0103 opened a new issue, #2663:
URL: https://github.com/apache/incubator-hugegraph/issues/2663

   ### Problem Type (问题类型)
   
   None
   
   ### 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.5
   
   ### Your Question (问题描述)
   
   PDClient -> newLeaderStub()
   ```
   ...
   for (int i = 0; i < stubProxy.getHostCount(); i++) {
               String host = stubProxy.nextHost();
               ManagedChannel channel = Channels.getChannel(host);
   
               PDGrpc.PDBlockingStub stub = PDGrpc.newBlockingStub(channel)
                                                  
.withDeadlineAfter(config.getGrpcTimeOut(),
                                                                     
TimeUnit.MILLISECONDS);
               try {
                   var leaderIp = getLeaderIp(stub);
                   if (!leaderIp.equalsIgnoreCase(host)) {
                       leaderHost = leaderIp;
                       stubProxy.set(PDGrpc.newBlockingStub(channel)
                                           
.withDeadlineAfter(config.getGrpcTimeOut(),
                                                              
TimeUnit.MILLISECONDS));
                   } else {
                       stubProxy.set(stub);
                       leaderHost = host;
                   }
   ....
   
   ```
   When the leaderIp is obtained and is different from the host, why does 
StubProxy.set() use the channel obtained based on the host instead of creating 
a new channel based on the leaderIp
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   _No response_
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   _No response_


-- 
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: dev-unsubscr...@hugegraph.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to