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 2022/08/11 06:08:47 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on a diff in pull request #3278: [#2611]Flow control code questions

liubao68 commented on code in PR #3278:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3278#discussion_r943122755


##########
handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/LeakyBucketStrategy.java:
##########
@@ -47,7 +47,7 @@ public boolean isLimitNewRequest() {
       throw new IllegalStateException("should not happen");
     }
     if (this.getBucketLimit() == null) {
-      this.setBucketLimit(Math.max(2 * this.getQpsLimit(), Integer.MAX_VALUE));
+      this.setBucketLimit(Math.min(2 * this.getQpsLimit(), Integer.MAX_VALUE));

Review Comment:
   Seems all of the two are not correct. 



-- 
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: commits-unsubscribe@servicecomb.apache.org

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