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
Make sure listeners are notified after first health check has resolved. #2074
Conversation
@@ -106,7 +113,7 @@ protected final void setEndpoints(Iterable<Endpoint> endpoints) { | |||
} | |||
|
|||
private void completeInitialEndpointsFuture(List<Endpoint> endpoints) { | |||
if (!endpoints.isEmpty() && !initialEndpointsFuture.isDone()) { |
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.
ah gotiti
Codecov Report
@@ Coverage Diff @@
## master #2074 +/- ##
============================================
- Coverage 73.8% 73.66% -0.14%
+ Complexity 9392 9373 -19
============================================
Files 817 817
Lines 36121 36125 +4
Branches 4452 4452
============================================
- Hits 26658 26611 -47
- Misses 7155 7211 +56
+ Partials 2308 2303 -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.
👍
core/src/main/java/com/linecorp/armeria/client/endpoint/DynamicEndpointGroup.java
Show resolved
Hide resolved
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.
👍
Thanks, @ikhoon ! |
Oops. Thanks, @anuraaga ! |
…d. (line#2074) Currently if all endpoints start out unhealthy, then the initial endpoints future for a health checked endpoint group never completes. The initial endpoints future should indicate when the endpoints have first been checked, not when they first become healthy - while an `EndpointGroup` with no `Endpoint`s is sort of useless, I think it's still a perfectly good `EndpointGroup` and deserves notifying listeners :)
…d. (line#2074) Currently if all endpoints start out unhealthy, then the initial endpoints future for a health checked endpoint group never completes. The initial endpoints future should indicate when the endpoints have first been checked, not when they first become healthy - while an `EndpointGroup` with no `Endpoint`s is sort of useless, I think it's still a perfectly good `EndpointGroup` and deserves notifying listeners :)
Currently if all endpoints start out unhealthy, then the initial endpoints future for a health checked endpoint group never completes. The initial endpoints future should indicate when the endpoints have first been checked, not when they first become healthy - while an
EndpointGroup
with noEndpoint
s is sort of useless, I think it's still a perfectly goodEndpointGroup
and deserves notifying listeners :)/cc @adriancole