You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/04 08:23:43 UTC

[GitHub] carryxyh opened a new issue #2023: ForkingClusterInvoker missing RpcContext and the attachments.

carryxyh opened a new issue #2023: ForkingClusterInvoker missing RpcContext and the attachments.
URL: https://github.com/apache/incubator-dubbo/issues/2023
 
 
   - [x] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
   - [x] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/wiki/FAQ) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 2.7.0-SNAPSHOT
   * Operating System version: mac os
   * Java version: 1.8
   
   ### Step to reproduce this issue
   
   1. Export a service
   2. Make cluster = "forking"
   3. Set Attachment in RpcContext
   4. Do rpc invoke
   
   
   ### Expected Result
   
   The attachment in RpcContext has element.
   
   ### Actual Result
   
   The attachment in RpcContext don't have element.
   
   ### The problem
   I set attachment in the consumer side like this:
   ![image](https://user-images.githubusercontent.com/12047600/42265457-30483704-7fa6-11e8-8075-2eede7775b3a.png)
   
   Then do rpc invoke,but the attachment is missing, (AbstractInvoker#invoke):
   ![image](https://user-images.githubusercontent.com/12047600/42265551-6b74d300-7fa6-11e8-8ad6-359cf091a3ac.png)
   
   The problem is that ForkingClusterInvoker use threapool to do rpc invoke which will miss the threadlocal:
   ![image](https://user-images.githubusercontent.com/12047600/42265595-92dae95c-7fa6-11e8-8ae3-3332cc67e4d3.png)
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org