-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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 cluster #11063
【fix】forking cluster #11063
Conversation
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ForkingClusterInvoker.java
Outdated
Show resolved
Hide resolved
for (final Invoker<T> invoker : selected) { | ||
final CountDownLatch countDownLatch = new CountDownLatch(1); | ||
AtomicReference<Object> result = new AtomicReference<>(); | ||
selected.forEach(invoker -> { |
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.
It looks like CompletableFuture.anyOf
can satisfy this requirement.
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 think so
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.
need consider exception case
n provider first n-1 exceptions need to be ignored
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ForkingClusterInvoker.java
Outdated
Show resolved
Hide resolved
@XDanwar Please complete this section in the 3.2 branch. |
done |
Codecov Report
@@ Coverage Diff @@
## 3.2 #11063 +/- ##
============================================
- Coverage 64.93% 64.86% -0.07%
Complexity 14 14
============================================
Files 1462 1471 +9
Lines 60911 61244 +333
Branches 8937 8980 +43
============================================
+ Hits 39551 39725 +174
- Misses 17182 17315 +133
- Partials 4178 4204 +26
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
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.
LGTM
Kudos, SonarCloud Quality Gate passed! |
CompletableFuture + CountDownLatch 实现 ForkingClusterInvoker 调用provider
issue: #11052