fanjiang-2021 opened a new issue #2587:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2587


   
https://github.com/apache/servicecomb-java-chassis/blob/b1948e193c7516a58dcc70f72adabb574171a0c4/foundations/foundation-registry/src/main/java/org/apache/servicecomb/registry/consumer/MicroserviceVersions.java#L252
   
   pulledInstances 目前 包含 所有的instance,在极端场景下,比如说注册中心 跟服务端同时出故障,然后又恢复,服务端IP 
发生变更,这个时候pulledInstances 会包含服务端新旧两个实例信息,这个时候 旧实例信息 实际已经不可用,当前操作 
是将pulledInstances 所有的instance添加到instances,是否可以加一个判断 在处理,比如:
     MergedInstances mergedInstances = new MergedInstances();
       MicroserviceInstancePing ping = 
SPIServiceUtils.getPriorityHighestService(MicroserviceInstancePing.class);
       pulledInstances.stream().forEach(instance -> {
         if (ping.ping(instance)){
           mergedInstances.addInstance(instance);
         }
       });


-- 
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]


Reply via email to