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/03/25 09:30:18 UTC

[GitHub] [servicecomb-java-chassis] liubao68 opened a new pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

liubao68 opened a new pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664
 
 
   … operation and using CseHttpEntity to set localcontext
   
   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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398718860
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/definition/PojoConsumerMapKey.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * 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.provider.pojo.definition;
+
+/**
+ * In consumer, every schema may have many consumer interfaces, each interface may contain part of the
+ * scheme operations.
+ */
+public class PojoConsumerMapKey {
 
 Review comment:
   "multiple consumer interface for one operation"  
   i can not understand......  
     
   do you mean "nickname" feature?
   ```
   public interface CodeFirstPojoClientIntf extends CodeFirstPojoIntf {
     @ApiOperation(nickname = "sayHi", value = "")
     CompletableFuture<String> sayHiAsync(String name);
   
     String sayHi2(String name);
   }
   ```

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398726571
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -148,7 +148,7 @@ public Object invoke(Object proxy, Method method, Object[] args) {
     }
 
     PojoConsumerOperationMeta pojoConsumerOperationMeta = consumerMeta
-        .findOperationMeta(MethodUtils.findSwaggerMethodName(method));
+        .findOperationMeta(MethodUtils.findSwaggerMethodName(method), consumerIntf);
 
 Review comment:
   consumerMeta only belongs to this invoker instance  
   only relate to this one consumerIntf class  
   seems no need to build a complex key?

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] coveralls commented on issue #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#issuecomment-603858929
 
 
   
   [![Coverage Status](https://coveralls.io/builds/29607476/badge)](https://coveralls.io/builds/29607476)
   
   Coverage increased (+0.01%) to 84.998% when pulling **478643f1f8ce88ba7edbe76af108d12144d2e678 on liubao68:release** into **6cef5feb94807a246611dc213ba23512def06dc6 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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398982123
 
 

 ##########
 File path: demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/TestDateTimeSchema.java
 ##########
 @@ -92,4 +119,39 @@ private void testDateTimeSchema() {
         dateTimeSchemaInf.postLocalDateTime(localDateTime)
             .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS")));
   }
+
+  private void testDateTimeSchemaMulticast() {
+    DiscoveryContext context = new DiscoveryContext();
+    VersionedCache serversVersionedCache = discoveryTree.discovery(context, "springmvctest", "springmvc", "0+");
+    List<String> enpoints = serversVersionedCache.data();
+
+    for (String endpoint : enpoints) {
+      InvocationContext invocationContext = new InvocationContext();
+      invocationContext.addLocalContext(LoadbalanceHandler.SERVICECOMB_SERVER_ENDPOINT, endpoint);
+      Date date = new Date();
+      TestMgr.check(date.getTime(), dateTimeSchemaWithContextInf.getDate(invocationContext, date).getTime());
 
 Review comment:
   we have to now, because LoadBalanceHandler read string endpoint. 

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398723010
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -162,6 +162,8 @@ public Object invoke(Object proxy, Method method, Object[] args) {
 
     SwaggerConsumerOperation consumerOperation = pojoConsumerOperationMeta.getSwaggerConsumerOperation();
     OperationMeta operationMeta = pojoConsumerOperationMeta.getOperationMeta();
+    // operation meta is static data based on swagger, while consumer operation based on invoker, have interface info
+    operationMeta.setSwaggerConsumerOperation(consumerOperation);
 
 Review comment:
   maybe there are different consumer interfaces.  
   if set back to operationMeta, will cause problem.

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r399007937
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -162,6 +162,8 @@ public Object invoke(Object proxy, Method method, Object[] args) {
 
     SwaggerConsumerOperation consumerOperation = pojoConsumerOperationMeta.getSwaggerConsumerOperation();
     OperationMeta operationMeta = pojoConsumerOperationMeta.getOperationMeta();
+    // operation meta is static data based on swagger, while consumer operation based on invoker, have interface info
+    operationMeta.setSwaggerConsumerOperation(consumerOperation);
 
 Review comment:
   as we disscussed, we create new issue to resolve this.

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r399007773
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -148,7 +148,7 @@ public Object invoke(Object proxy, Method method, Object[] args) {
     }
 
     PojoConsumerOperationMeta pojoConsumerOperationMeta = consumerMeta
-        .findOperationMeta(MethodUtils.findSwaggerMethodName(method));
+        .findOperationMeta(MethodUtils.findSwaggerMethodName(method), consumerIntf);
 
 Review comment:
   meta from Invoker should not set in OperationMeta  
   because as you said, there are different invokers  
   we can create a new issue to optimize this.

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398721149
 
 

 ##########
 File path: demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/TestDateTimeSchema.java
 ##########
 @@ -92,4 +119,39 @@ private void testDateTimeSchema() {
         dateTimeSchemaInf.postLocalDateTime(localDateTime)
             .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS")));
   }
+
+  private void testDateTimeSchemaMulticast() {
+    DiscoveryContext context = new DiscoveryContext();
+    VersionedCache serversVersionedCache = discoveryTree.discovery(context, "springmvctest", "springmvc", "0+");
+    List<String> enpoints = serversVersionedCache.data();
+
+    for (String endpoint : enpoints) {
+      InvocationContext invocationContext = new InvocationContext();
+      invocationContext.addLocalContext(LoadbalanceHandler.SERVICECOMB_SERVER_ENDPOINT, endpoint);
+      Date date = new Date();
+      TestMgr.check(date.getTime(), dateTimeSchemaWithContextInf.getDate(invocationContext, date).getTime());
 
 Review comment:
   not so good.  
   this makes parse endpoint for each invocation?

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r399008152
 
 

 ##########
 File path: demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/TestDateTimeSchema.java
 ##########
 @@ -92,4 +119,39 @@ private void testDateTimeSchema() {
         dateTimeSchemaInf.postLocalDateTime(localDateTime)
             .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS")));
   }
+
+  private void testDateTimeSchemaMulticast() {
+    DiscoveryContext context = new DiscoveryContext();
+    VersionedCache serversVersionedCache = discoveryTree.discovery(context, "springmvctest", "springmvc", "0+");
+    List<String> enpoints = serversVersionedCache.data();
+
+    for (String endpoint : enpoints) {
+      InvocationContext invocationContext = new InvocationContext();
+      invocationContext.addLocalContext(LoadbalanceHandler.SERVICECOMB_SERVER_ENDPOINT, endpoint);
+      Date date = new Date();
+      TestMgr.check(date.getTime(), dateTimeSchemaWithContextInf.getDate(invocationContext, date).getTime());
 
 Review comment:
   when optimize this, LB should be change too.

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398718860
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/definition/PojoConsumerMapKey.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * 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.provider.pojo.definition;
+
+/**
+ * In consumer, every schema may have many consumer interfaces, each interface may contain part of the
+ * scheme operations.
+ */
+public class PojoConsumerMapKey {
 
 Review comment:
   "multiple consumer interface for one operation"  
   i can not understand......  
     
   do you mean "nickname" feature?
   ```
   public interface CodeFirstPojoClientIntf extends CodeFirstPojoIntf {
     @ApiOperation(nickname = "sayHi", value = "")
     CompletableFuture<String> sayHiAsync(String name);
   
     String sayHi2(String name);
   }
   ```

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r399018220
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -148,7 +148,7 @@ public Object invoke(Object proxy, Method method, Object[] args) {
     }
 
     PojoConsumerOperationMeta pojoConsumerOperationMeta = consumerMeta
-        .findOperationMeta(MethodUtils.findSwaggerMethodName(method));
+        .findOperationMeta(MethodUtils.findSwaggerMethodName(method), consumerIntf);
 
 Review comment:
   issue: https://issues.apache.org/jira/browse/SCB-1830

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664
 
 
   

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r399018033
 
 

 ##########
 File path: demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/TestDateTimeSchema.java
 ##########
 @@ -92,4 +119,39 @@ private void testDateTimeSchema() {
         dateTimeSchemaInf.postLocalDateTime(localDateTime)
             .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS")));
   }
+
+  private void testDateTimeSchemaMulticast() {
+    DiscoveryContext context = new DiscoveryContext();
+    VersionedCache serversVersionedCache = discoveryTree.discovery(context, "springmvctest", "springmvc", "0+");
+    List<String> enpoints = serversVersionedCache.data();
+
+    for (String endpoint : enpoints) {
+      InvocationContext invocationContext = new InvocationContext();
+      invocationContext.addLocalContext(LoadbalanceHandler.SERVICECOMB_SERVER_ENDPOINT, endpoint);
+      Date date = new Date();
+      TestMgr.check(date.getTime(), dateTimeSchemaWithContextInf.getDate(invocationContext, date).getTime());
 
 Review comment:
   I create a issue for this : https://issues.apache.org/jira/browse/SCB-1831

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398966887
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -162,6 +162,8 @@ public Object invoke(Object proxy, Method method, Object[] args) {
 
     SwaggerConsumerOperation consumerOperation = pojoConsumerOperationMeta.getSwaggerConsumerOperation();
     OperationMeta operationMeta = pojoConsumerOperationMeta.getOperationMeta();
+    // operation meta is static data based on swagger, while consumer operation based on invoker, have interface info
+    operationMeta.setSwaggerConsumerOperation(consumerOperation);
 
 Review comment:
   begin from scb-1706, that modify is not a good idea.  
   

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398982531
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -148,7 +148,7 @@ public Object invoke(Object proxy, Method method, Object[] args) {
     }
 
     PojoConsumerOperationMeta pojoConsumerOperationMeta = consumerMeta
-        .findOperationMeta(MethodUtils.findSwaggerMethodName(method));
+        .findOperationMeta(MethodUtils.findSwaggerMethodName(method), consumerIntf);
 
 Review comment:
   This is what this PR for , two interfaces should working in one consumer
   ```
   interface DateTimeSchemaInf {
     Date getDate(Date date);	
   }
   
   
   interface DateTimeSchemaWithContextInf {
     Date getDate(InvocationContext context, Date date);
   }
   ```

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1664: [SCB-1822]fix problems when using multiple consumer interface for one…
URL: https://github.com/apache/servicecomb-java-chassis/pull/1664#discussion_r398984065
 
 

 ##########
 File path: providers/provider-pojo/src/main/java/org/apache/servicecomb/provider/pojo/Invoker.java
 ##########
 @@ -162,6 +162,8 @@ public Object invoke(Object proxy, Method method, Object[] args) {
 
     SwaggerConsumerOperation consumerOperation = pojoConsumerOperationMeta.getSwaggerConsumerOperation();
     OperationMeta operationMeta = pojoConsumerOperationMeta.getOperationMeta();
+    // operation meta is static data based on swagger, while consumer operation based on invoker, have interface info
+    operationMeta.setSwaggerConsumerOperation(consumerOperation);
 
 Review comment:
   From invocation, can only get OperationMeta. Current code put all invocation data(e.g. response type) to OperationMeta. This is not good, need refactor in future, but this PR not working on this refactoring, because it is related to some other parts besides this issue.  I create an [issue](https://issues.apache.org/jira/browse/SCB-1830) and refactoring the code later.

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


With regards,
Apache Git Services