liubao68 commented on a change in pull request #1037: [SCB-1080]Add a log while 
get empty server list
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1037#discussion_r241372497
 
 

 ##########
 File path: 
handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadBalancer.java
 ##########
 @@ -52,8 +57,12 @@ public LoadBalancer(RuleExt rule, String microServiceName) {
 
   public ServiceCombServer chooseServer(Invocation invocation) {
     List<ServiceCombServer> servers = 
invocation.getLocalContext(LoadbalanceHandler.CONTEXT_KEY_SERVER_LIST);
+    int serversCount = servers.size();
     for (ServerListFilterExt filterExt : filters) {
       servers = filterExt.getFilteredListOfServers(servers, invocation);
+      if (servers.isEmpty() && serversCount > 0) {
+        LOGGER.warn("There are not servers exist after filtered by {}.", 
filterExt.getClass());
 
 Review comment:
   add a break here

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