Yes, we are facing this problem when using async:
1. Consumer side, I found this problem and added a TODO in here when writing 
down this async 
feature.
https://github.com/apache/incubator-dubbo/blob/7d3a6ab0c19b8182d8a8b0d907d0ed758e65c2a7/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ConsumerContextFilter.java#L52
  
At first, I want to use `RpcContext.removeContext()` to remove the RpcContext 
instance from the current thread, but users may need the RpcContext after a 
Dubbo remote call.

2. Provider side, 
This would not be a problem with `RpcContext.removeContext()` in ContextFilter
https://github.com/apache/incubator-dubbo/blob/7d3a6ab0c19b8182d8a8b0d907d0ed758e65c2a7/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java#L75

Anyway, I tend to agree with you, as what I can think of now, a copy of 
RpcContext may be a good solution.


[ Full content available at: 
https://github.com/apache/incubator-dubbo/issues/2323 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to