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 2021/11/23 09:51:05 UTC

[GitHub] [dubbo] zrlw edited a comment on pull request #9284: [3.0] save current rpc service context to url at the beginning of invocation to support LazyConnectExchangeClient and avoid NPE

zrlw edited a comment on pull request #9284:
URL: https://github.com/apache/dubbo/pull/9284#issuecomment-974688228


   关闭ReferenceCountExchangeClient时替换为LazyConnectExchangeClient时,要调用url.getProtocol(),url.getPath(),url.getParameters(),这些方法都需要从上次rpc调用的rpcServiceContext获取,但是rpcServiceContext在上次rpc调用后已经被清除,上述方法即便不NPE也获取不了原值, InstanceAddressURL只增加scope model解决不了这个问题。
   #9284 将当前rpc的service context存入了InstanceAddressURL对象,rpc调用结束后通过url保存的service context继续支持上述方法,SpringXmlConfigTest增加了相关验证逻辑。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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