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/06/04 02:21:14 UTC

[GitHub] [servicecomb-java-chassis] yhs0092 commented on a change in pull request #1232: [SCB-1308] improve instance isolation recovery mechanism

yhs0092 commented on a change in pull request #1232: [SCB-1308] improve instance isolation recovery mechanism
URL: https://github.com/apache/servicecomb-java-chassis/pull/1232#discussion_r290104596
 
 

 ##########
 File path: handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadBalancer.java
 ##########
 @@ -65,7 +65,19 @@ public ServiceCombServer chooseServer(Invocation invocation) {
         break;
       }
     }
-    return rule.choose(servers, invocation);
+    ServiceCombServer server = rule.choose(servers, invocation);
+    if (null == server) {
+      return null;
+    }
+    ServiceCombServerStats serverStats = ServiceCombLoadBalancerStats.INSTANCE.getServiceCombServerStats(server);
+    if (ServiceCombServerStatus.ISOLATED == serverStats.getStatus()
+        && serverStats.markStatusAtomically(ServiceCombServerStatus.ISOLATED, ServiceCombServerStatus.TRYING)) {
 
 Review comment:
   In `IsolationDiscoveryFilter`, the isolated instances which have passed the `singleTestTime` will be selected into the available instance list to have a try. So here the isolated instances can be used.

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