commit | c1fffdfd7f235d2613e8f4cb54808f8a06602c23 | [log] [tgz] |
---|---|---|
author | hujinming <84767920+hujinming178@users.noreply.github.com> | Thu Aug 11 21:16:33 2022 +0800 |
committer | GitHub <noreply@github.com> | Thu Aug 11 21:16:33 2022 +0800 |
tree | 1b74f0ca59ee596637cbef191985200e0378152d | |
parent | 42dbb47bf50360eea419241babf97659f2fa4085 [diff] |
[SCB-2666]The bucket value logic is incorrect (#3278)
diff --git a/handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/LeakyBucketStrategy.java b/handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/LeakyBucketStrategy.java index 8e811c9..b8bf65c 100644 --- a/handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/LeakyBucketStrategy.java +++ b/handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/LeakyBucketStrategy.java
@@ -47,7 +47,7 @@ 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)); } long nowTime = System.currentTimeMillis(); //get the num of te period time