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 2018/12/14 03:40:47 UTC
[GitHub] laijianbin commented on a change in pull request #1037:
[SCB-1080]Add a log while get empty server list
laijianbin 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_r241636808
##########
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:
down
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services