You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "Likun Liu (Jira)" <ji...@apache.org> on 2020/06/02 01:08:00 UTC

[jira] [Created] (SCB-1974) LoadBalance isolation feature should trigger on provider errors

Likun Liu created SCB-1974:
------------------------------

             Summary: LoadBalance isolation feature should trigger on provider errors
                 Key: SCB-1974
                 URL: https://issues.apache.org/jira/browse/SCB-1974
             Project: Apache ServiceComb
          Issue Type: Bug
            Reporter: Likun Liu


In LoadBalance module, there is isolation feature which triggers on the error rate from providers. However, the way to check if the request is failed or not seems wrong: [https://github.com/apache/servicecomb-java-chassis/blob/master/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java#L431-L432]
{code:java}
// code placeholder
        return e.getStatusCode() == ExceptionFactory.CONSUMER_INNER_STATUS_CODE            || e.getStatusCode() == 503;
{code}
We'd also include  `ExceptionFactory.PRODUCER_INNER_STATUS_CODE`, which implies the error from providers. 

I'm not sure why `ExceptionFactory.CONSUMER_INNER_STATUS_CODE` is used in the check, it doesn't help to isolate on providers since the error is from consumer side. Maybe there are other reasons (maybe for the stats?) for this error code is used.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)