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 2021/03/09 00:58:13 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2287: [SCB-2210]fix the flow control error when configuration changed in config center

liubao68 commented on a change in pull request #2287:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2287#discussion_r589860353



##########
File path: handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/QpsControllerManager.java
##########
@@ -200,13 +201,18 @@ private void createQpsControllerIfNotExist(String configKey) {
   }
 
   protected void updateObjMap(String configKey) {
-    for (Entry<String, AbstractQpsStrategy> controllerEntry : qualifiedNameControllerMap
-        .entrySet()) {
-      if (keyMatch(configKey, controllerEntry)) {
-        AbstractQpsStrategy qpsStrategy = searchQpsController(controllerEntry.getKey());
-        controllerEntry.setValue(qpsStrategy);
-        LOGGER.info("QpsController updated, operationId = [{}], configKey = [{}], qpsLimit = [{}]",
-            controllerEntry.getKey(), qpsStrategy.getKey(), qpsStrategy.getQpsLimit());
+    Iterator<Entry<String, AbstractQpsStrategy>> it = qualifiedNameControllerMap.entrySet().iterator();

Review comment:
       Can you add a test case for this issue? see QpsControllerManagerTest for examples 




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