-
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
Fix forking npe #9613
Fix forking npe #9613
Conversation
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 |
Codecov Report
@@ Coverage Diff @@
## master #9613 +/- ##
============================================
- Coverage 60.89% 60.79% -0.10%
Complexity 448 448
============================================
Files 1100 1100
Lines 44520 44520
Branches 6478 6479 +1
============================================
- Hits 27111 27067 -44
- Misses 14441 14483 +42
- Partials 2968 2970 +2
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
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ForkingClusterInvoker.java
Show resolved
Hide resolved
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ForkingClusterInvoker.java
Show resolved
Hide resolved
Let focus on #9612 |
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