HancaiWang opened a new issue #796: 服务实例信息永远丢失
URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/796
 
 
   当如下代码块中microserviceInstance == 
null或needRefresh为false时,则服务实例如没有状态变化,则不会再更新服务实例信息,这样会导致暂时的同SC网络不稳定时,会引起返回结果不是200
 OK,服务中服务实例信息与SC永远不一致  
   public void pullInstances() {
       if (pendingPullCount.decrementAndGet() != 0) {
         return;
       }
   
       MicroserviceInstances microserviceInstances = 
RegistryUtils.findServiceInstances(appId,
           microserviceName,
           DefinitionConst.VERSION_RULE_ALL,
           revision);
       if (microserviceInstances == null) {
         return;
       }
       if (!microserviceInstances.isNeedRefresh()) {
         return;
       }
       List<MicroserviceInstance> pulledInstances = 
microserviceInstances.getInstancesResponse().getInstances();
       String rev = microserviceInstances.getRevision();
   
       safeSetInstances(pulledInstances, rev);
     }
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to