[ 
https://issues.apache.org/jira/browse/SCB-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436704#comment-16436704
 ] 

ASF GitHub Bot commented on SCB-481:
------------------------------------

eric-lee-ltk commented on a change in pull request #647: [SCB-481]Fix qps 
handler compatible issues due to assumption to schema ids not contains dot
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/647#discussion_r181271866
 
 

 ##########
 File path: 
handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/QpsControllerManager.java
 ##########
 @@ -48,22 +46,22 @@
 
   private String configKeyPrefix;
 
-  public QpsController getOrCreate(String key) {
-    return qualifiedNameControllerMap.computeIfAbsent(key, this::create);
+  public QpsController getOrCreate(String microerviceName, Invocation 
invocation) {
+    return qualifiedNameControllerMap
+        .computeIfAbsent(microerviceName + SEPARATOR + 
invocation.getOperationMeta().getSchemaQualifiedName(), key -> {
+          return create(key, microerviceName, invocation);
+        });
   }
 
   /**
    * Create relevant qpsLimit dynamicProperty and watch the configuration 
change.
    * Search and return a valid qpsController.
    */
-  protected QpsController create(String qualifiedNameKey) {
-    if (!QUALIFIED_KEY_CHECKER.matcher(qualifiedNameKey).matches()) {
-      throw new IllegalArgumentException("Unexpected qualified name: [" + 
qualifiedNameKey + "]");
-    }
+  protected QpsController create(String qualifiedNameKey, String 
microerviceName, Invocation invocation) {
 
 Review comment:
   typo, microerviceName

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Fix qps handler assertion errors when schemaid or microservice name contails 
> . (dot)
> ------------------------------------------------------------------------------------
>
>                 Key: SCB-481
>                 URL: https://issues.apache.org/jira/browse/SCB-481
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>            Reporter: liubao
>            Priority: Major
>
> As now we have default schema ids generate by @RpcContext and other. Qps 
> handler assumes and assert schema id do not have . (dot) will cause 
> compatible issues. Now we need to make it work. 
>  
> If we need have conventions for name, leave it to future discussion.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to