wwbmmm commented on issue #1664:
URL: 
https://github.com/apache/incubator-brpc/issues/1664#issuecomment-1132770659

   > 
这块如果不调用span->AsParent,因为A协程已经处理完了自己的请求,controller都已经释放了,span也可能回收了,接下来A协程去执行B协程的请求,如果继续使用A其原有请求的span就会引起问题。所以需要把B协程的那个请求设置成thread
 local的span。
   > 服务端在比如baidu_std协议,ProcessRpcRequest里面也会做span->AsParent(),这个span就是当前请求的span。
   
   span->AsParent设置的是bthread::tls_bls.rpcz_parent_span
   
而bthread::tls_bls.rpcz_parent_span只有在Channel::CallMethod里面,或者AnnotateSpan/TRACEPRINTF的时候会读取。只有在用到这些功能的时候才会有可能出现“继续使用A其原有请求的span就会引起问题”


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