liunancun opened a new issue #9534: URL: https://github.com/apache/dubbo/issues/9534
使用org.apache.dubbo.rpc.Filter传递上下文信息,使用InheritableThreadLocal存储上下文参数,之前2.7.3版本的时候是没有问题的,最近升级到3.0.5版本之后,发现这个ThreadLocal是由main线程创建的,因为这个ThreadLocal是子线程共享的,导致所有线程都获取到同一参数。 经过定位发现3.0.5版本在启动的时候会调用MetadataService服务,是通过main线程直接调用的,调用过程中会经过Filter,导致直接在主线程创建了ThreadLocal,后面所有的Tomcat线程都共享了主线程创建的这个ThreadLocal了 -- 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]
