complone commented on a change in pull request #1727:
URL: https://github.com/apache/dubbo-go/pull/1727#discussion_r793457046



##########
File path: protocol/dubbo3/dubbo3_invoker.go
##########
@@ -203,10 +203,21 @@ func (di *DubboInvoker) Invoke(ctx context.Context, 
invocation protocol.Invocati
        methodName := invocation.MethodName()
        triAttachmentWithErr := di.client.Invoke(methodName, in, 
invocation.Reply())
        result.Err = triAttachmentWithErr.GetError()
+
        result.Attrs = make(map[string]interface{})
+
        for k, v := range triAttachmentWithErr.GetAttachments() {
                result.Attrs[k] = v
        }
+
+       // Here, before making a remote call, the server may be terminated 
because the value is transmitted to the client.
+       // Because each rpc request will initiate dubboinvoker -> filter 
invoker multiple times
+       // So you need to consider using the variables called by the call chain 
for maintenance
+
+       for k, v := range invocation.Attachments() {

Review comment:
       
这里的话因为原来通过client调用服务端接口的时候,经过proxy会产生多次传值的情况。断点跟下来的时候可能会造成上下文attr丢失,所以想从invocation调用链这边获取当前goroutine的上下文attr
 @LaurenceLiZhixin 




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to