You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/05/14 07:13:50 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1196: [SCB-1274]when service center is unavailable, service should enter sa…

liubao68 commented on a change in pull request #1196: [SCB-1274]when service center is unavailable, service should enter sa…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1196#discussion_r283654524
 
 

 ##########
 File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##########
 @@ -193,20 +197,26 @@ private void setInstances(List<MicroserviceInstance> pulledInstances, String rev
 
   private List<MicroserviceInstance> mergeInstances(List<MicroserviceInstance> pulledInstances,
       List<MicroserviceInstance> inUseInstances) {
-    List<MicroserviceInstance> upInstances = pulledInstances
-        .stream()
-        .collect(Collectors.toList());
+    List<MicroserviceInstance> upInstances = new ArrayList<>(pulledInstances);
 
 Review comment:
   Can you describe why we need to add this feature? I think this logic is quite a bit confusing. 1. when service center is down, we can't get any instances; 2. service center status has no relationship with microservice instance status. Now no instances will beremoved when no instances queried from service center. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services