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

grpclb: filter out grpclb addresses if balancer in use is not grpclb #2509

Merged
merged 4 commits into from
Dec 13, 2018

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Dec 7, 2018

This can happen when resolved addresses contain grpclb address, but grpclb is
not registered.

This can happen when resolved addresses contain grpclb address, but grpclb is
not registered.
// balancer map.
//
// This function is not thread-safe. And should only be used for testing.
func UnregisterForTesting(name string) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this into internal, please? (I.e. store the map itself there.) I want to avoid cluttering our external API with implementation details or testing functions at all costs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an internal function pointer.

r, rcleanup := manual.GenerateAndRegisterManualResolver()
defer rcleanup()

numServers := 3
Copy link
Member

Choose a reason for hiding this comment

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

const (or just delete and use the 3 directly on the following line)

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 Dec 7, 2018
@menghanl menghanl merged commit 191cc8e into grpc:master Dec 13, 2018
@menghanl menghanl deleted the grpclb_fallback_pickfirst branch December 13, 2018 18:54
@dfawley dfawley added this to the 1.18 Release milestone Dec 13, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jun 12, 2019
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.

2 participants