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 10:05:54 UTC
[GitHub] [dubbo] zrlw commented 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 commented on pull request #9284:
URL: https://github.com/apache/dubbo/pull/9284#issuecomment-976360406
尝试过rpc调用后service context不做清理的方法,改为InvokerInvocationHandler的invoke方法开始调用前再清理。
后来发现InvokerInvocationHandler#invoke这个方法是consumer和provider共用的方法,而这个方法并不是provider的处理rpc的入口,真正的入口貌似很多,比如DubboHttpProtocolServer#RestHandler#handle,DubboProtocol#requestHandler#reply,执行到InvokerInvocationHandler的invoke方法之前service context里已经添加了一些provider的参数,比如remoteAddress,request等等。
所以在InvokerInvocationHandler的invoke方法里不能清理provider的service context,此外InvokerInvocationHandler的invoke方法未必就是consumer的唯一入口,所以最终还是放弃了rpc调用后不清理service context的想法。
--
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