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

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

weichao666 commented on a change in pull request #1022: [SCB-1065] when request 
not contain traceId,should use provider's invocation's traceId
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1022#discussion_r238920499
 
 

 ##########
 File path: 
swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/context/InvocationContext.java
 ##########
 @@ -68,6 +68,22 @@ public void addContext(Map<String, String> otherContext) {
     context.putAll(otherContext);
   }
 
+  public void mergeContext(InvocationContext otherContext) {
+    mergeContext(otherContext.getContext());
+  }
+
+  public void mergeContext(Map<String, String> otherContext) {
+    if (otherContext == null) {
+      return;
+    }
+    if (otherContext.size() > context.size()) {
+      otherContext.putAll(context);
 
 Review comment:
   done, use otherContext.putIfAbsent, when otherContext's key is already 
exists, use otherContext's value, when otherContext does not contain key, use 
context's value 

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


> when request not contain traceId,should use provider's invocation's traceId
> ---------------------------------------------------------------------------
>
>                 Key: SCB-1065
>                 URL: https://issues.apache.org/jira/browse/SCB-1065
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>            Reporter: WeiChao
>            Assignee: WeiChao
>            Priority: Major
>             Fix For: java-chassis-1.2.0
>
>
> when request not contain traceId,should use provider's invocation's traceId



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

Reply via email to