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
Fix forkingclusterinvoker npe #9612
Conversation
Codecov Report
@@ Coverage Diff @@
## 3.0 #9612 +/- ##
============================================
+ Coverage 65.66% 65.75% +0.08%
Complexity 297 297
============================================
Files 1189 1189
Lines 51824 51823 -1
Branches 7843 7843
============================================
+ Hits 34032 34077 +45
+ Misses 14117 14076 -41
+ Partials 3675 3670 -5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's reasonable to make the queue wait indefinitely, which may generate some unknown exceptions, and a reasonable way would be to reverse the relevant exception message when the ret is empty
Agree with @juzi214032 |
solved by #9613 |
What is the purpose of the change
fix #9582
When the cluster uses the forking mode and the provider side all times out ,consumer side will npe
Brief changelog
org.apache.dubbo.rpc.cluster.support.ForkingClusterInvoker
org.apache.dubbo.rpc.cluster.support.ForkingClusterInvokerTest
Verifying this change
Checklist
When the cluster uses the forking mode and the provider side all times out, the poll method used in forkingClusterInvoker will time out earlier than the provider side, so it will get null from the queue and throw NPE in the subsequent process. The poll method here should not set the timeout time, but wait for the provider to timeout. When the provider times out, the poll method will correctly obtain an RpcException