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/03 14:45:54 UTC

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

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

 ##########
 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)) {
+      // ensure the status of the chosen isolated instance is changed to TRYING, other isolated instances is still ISOLATED
 
 Review comment:
   for concurrency requests, this mark logic not always work?

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