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 2020/07/16 11:34:37 UTC

[GitHub] [servicecomb-java-chassis] GuoYL123 opened a new pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

GuoYL123 opened a new pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885


   Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line and body.
    - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#discussion_r456256430



##########
File path: handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/SlidingWindowStrategy.java
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.qps.strategy;
+
+
+/**
+ * @Date 2020/7/8
+ **/
+public class SlidingWindowStrategy extends AbstractQpsStrategy {
+
+  public SlidingWindowStrategy(long qpsLimit, String key) {

Review comment:
       Seems no used. 




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

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



[GitHub] [servicecomb-java-chassis] GuoYL123 commented on a change in pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#discussion_r456241997



##########
File path: handlers/handler-router/src/main/java/org/apache/servicecomb/router/custom/RouterInvokeFilter.java
##########
@@ -109,7 +109,7 @@ private boolean loadHeaders() {
   private boolean isHaveHeadersRule() {
     DynamicStringProperty headerStr = DynamicPropertyFactory.getInstance()
         .getStringProperty(SERVICECOMB_ROUTER_HEADER, null);
-    return !StringUtils.isEmpty(headerStr.get());
+    return !StringUtils.isNotEmpty(headerStr.get());

Review comment:
       done




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

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



[GitHub] [servicecomb-java-chassis] coveralls commented on pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#issuecomment-659413977


   
   [![Coverage Status](https://coveralls.io/builds/32113117/badge)](https://coveralls.io/builds/32113117)
   
   Coverage decreased (-0.05%) to 86.338% when pulling **ff6413195969c618219accad125528090d0550bc on GuoYL123:master** into **08676b5ff8590560d02c508c881c25c340678a29 on apache:master**.
   


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

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



[GitHub] [servicecomb-java-chassis] GuoYL123 commented on a change in pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#discussion_r456297600



##########
File path: handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/SlidingWindowStrategy.java
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.qps.strategy;
+
+
+/**
+ * @Date 2020/7/8
+ **/
+public class SlidingWindowStrategy extends AbstractQpsStrategy {
+
+  public SlidingWindowStrategy(long qpsLimit, String key) {

Review comment:
       deleted




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

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#discussion_r456253553



##########
File path: handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/FixedWindowStrategy.java
##########
@@ -14,15 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-package org.apache.servicecomb.qps;
+package org.apache.servicecomb.qps.strategy;
 
 import java.util.concurrent.atomic.AtomicLong;
 
-public class QpsController {
-  private String key;
-
-  private Integer qpsLimit;
+/**
+ * @Date 2020/7/8

Review comment:
       `@Date` seems no use, can be removed. 




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

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#discussion_r456238801



##########
File path: handlers/handler-router/src/main/java/org/apache/servicecomb/router/custom/RouterInvokeFilter.java
##########
@@ -109,7 +109,7 @@ private boolean loadHeaders() {
   private boolean isHaveHeadersRule() {
     DynamicStringProperty headerStr = DynamicPropertyFactory.getInstance()
         .getStringProperty(SERVICECOMB_ROUTER_HEADER, null);
-    return !StringUtils.isEmpty(headerStr.get());
+    return !StringUtils.isNotEmpty(headerStr.get());

Review comment:
       wrong




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

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



[GitHub] [servicecomb-java-chassis] GuoYL123 commented on a change in pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#discussion_r456297498



##########
File path: handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/strategy/FixedWindowStrategy.java
##########
@@ -14,15 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-package org.apache.servicecomb.qps;
+package org.apache.servicecomb.qps.strategy;
 
 import java.util.concurrent.atomic.AtomicLong;
 
-public class QpsController {
-  private String key;
-
-  private Integer qpsLimit;
+/**
+ * @Date 2020/7/8

Review comment:
       done




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

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



[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885


   


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

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



[GitHub] [servicecomb-java-chassis] coveralls edited a comment on pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#issuecomment-659413977


   
   [![Coverage Status](https://coveralls.io/builds/32136717/badge)](https://coveralls.io/builds/32136717)
   
   Coverage decreased (-0.06%) to 86.33% when pulling **d2ec877a026fcbce90edd68e7578d20f14098b36 on GuoYL123:master** into **08676b5ff8590560d02c508c881c25c340678a29 on apache:master**.
   


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

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



[GitHub] [servicecomb-java-chassis] coveralls edited a comment on pull request #1885: [SCB-2043] flow control support leak bucket and token bucket

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #1885:
URL: https://github.com/apache/servicecomb-java-chassis/pull/1885#issuecomment-659413977


   
   [![Coverage Status](https://coveralls.io/builds/32139313/badge)](https://coveralls.io/builds/32139313)
   
   Coverage decreased (-0.08%) to 86.306% when pulling **3b5ebd2057c157374352d28a8b7f598d01e887cb on GuoYL123:master** into **08676b5ff8590560d02c508c881c25c340678a29 on apache:master**.
   


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

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