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)

Reply via email to