-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LazyConnectExchangeClient关闭后没有将client重置为null #8880
Comments
This was referenced Sep 23, 2021
顺便修订了 #7410 引入的缺陷,该缺陷将会导致热加载的dubbo Reference关闭时不释放连接,问题详情见 #8895 重现方法:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
ReferenceCountExchangeClient关闭后,其ExchangeClient成员换成了LazyConnectExchangeClient以支持复活,但是目前的代码只能复活一次,复活之后的LazyConnectExchangeClient再次关闭之后就不能复活了。
原因是LazyConnectExchangeClient两个close方法没有将channel已关闭的client对象置为null,再次复活执行initClient方法时直接复用了这个channel已关闭的client,导致DubboInvoker.doInvoke抛RpcException,异常信息如下所示:
此外,ReferenceCountExchangeClientTest的test_counter_error()的测试代码与当前版本的LazyConnectExchangeClient之间存在多处不一致的地方。
比如测试代码认为:
ReferenceCountExchangeClient关闭时,ExchangeClient属性被替换为LazyConnectExchangeClient之后,相应dubboInvoker的available状态应该是false;但是实际情况available默认状态是true:
我不清楚设计LazyConnectExchangeClient的目的或者好处是什么,通常写代码时不会专门去使用一个channel已经关掉的client,并且这个client还只支持一次满血复活,复活再关闭之后就没有复活能力了。
The text was updated successfully, but these errors were encountered: