Skip to content
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

eds: skip unhealthy endpoints #3137

Merged
merged 4 commits into from Nov 5, 2019
Merged

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Nov 1, 2019

Unknown and healthy are both considered healthy.
clab1.addLocality(testSubZones[0], 1, testEndpointAddrs[:3], &addLocalityOptions{
health: []corepb.HealthStatus{
corepb.HealthStatus_HEALTHY,
corepb.HealthStatus_UNHEALTHY,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is also DRAINING, TIMEOUT, and DEGRADED. We should ideally include those as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dfawley dfawley assigned menghanl and unassigned dfawley Nov 4, 2019
@menghanl menghanl assigned dfawley and unassigned menghanl Nov 4, 2019
@dfawley dfawley assigned menghanl and unassigned dfawley Nov 4, 2019
@menghanl menghanl assigned dfawley and unassigned menghanl Nov 4, 2019
for i := 0; i < 4; i++ {
addr := <-cc.newSubConnAddrsCh
if addr[0].Addr != wantNewSubConnAddrStrs[i] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will they always happen in order?

Optional assuming they are always ordered for now: would a map[string]bool work better for wantNewSubConnAddrStrs? It could be more future-proof in case the order changes later. To ensure it doesn't do the same address four times, you could delete the entries from the map as they are pulled in from the channel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now with sort and cmp.Equal

@dfawley dfawley assigned menghanl and unassigned dfawley Nov 4, 2019
@menghanl menghanl merged commit bbd4b7a into grpc:master Nov 5, 2019
@menghanl menghanl deleted the xds_eds_endpoint_health branch November 5, 2019 17:03
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants