You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/05/07 10:07:50 UTC

[GitHub] [incubator-brpc] sunhs opened a new issue, #1758: integer division issue in CircuitBreaker

sunhs opened a new issue, #1758:
URL: https://github.com/apache/incubator-brpc/issues/1758

   https://github.com/apache/incubator-brpc/blob/c75d53a62c181db0aec300f41787c0c0786c69d0/src/brpc/circuit_breaker.cpp#L95
   
   With  `_max_error_percent` as an integer and less or equal to 100, it seems that the right hand side will always be either `_window_size` or `0`, which may causes a bug.


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

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] sunhs commented on issue #1758: integer division issue in CircuitBreaker

Posted by GitBox <gi...@apache.org>.
sunhs commented on issue #1758:
URL: https://github.com/apache/incubator-brpc/issues/1758#issuecomment-1120194220

   @wwbmmm I got it. Thanks


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

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on issue #1758: integer division issue in CircuitBreaker

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #1758:
URL: https://github.com/apache/incubator-brpc/issues/1758#issuecomment-1120185588

   The execution order is first `_window_size * _max_error_percent`
   then  `/ 100`


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

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] sunhs closed issue #1758: integer division issue in CircuitBreaker

Posted by GitBox <gi...@apache.org>.
sunhs closed issue #1758: integer division issue in CircuitBreaker
URL: https://github.com/apache/incubator-brpc/issues/1758


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

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org