-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: fix a bug in handling server address updates. #2754
Conversation
It didn't check if the address was already there in the current subchannel set before creating a new subchannel for it, causing a leak of subchannels.
I remember I had a comment on this before in #2557 and you replied
Was that the same concern as this PR? |
never mind, I understood that. |
@@ -601,15 +601,20 @@ public void grpclbWorking() { | |||
assertSame(error1, picker6.result.getStatus()); | |||
|
|||
// Update backends, with a drop entry | |||
List<InetSocketAddress> backends2 = Arrays.asList( | |||
new InetSocketAddress("127.0.0.1", 2030), null); | |||
List<InetSocketAddress> backends2 = |
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.
This test code may be too long. Maybe it's testing multiple things that could be separated?
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 agree the state of this test method is not ideal. Although it's testing multiple behaviors, every test depends the state left by the the previous tests as prerequisites, therefore it's non-trivial to split them apart, and I don't have the time to do it.
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.
File a tracking issue #2772 for the cleanup
ref #2772 |
It didn't check if the address was already there in the current
subchannel set before creating a new subchannel for it, causing a leak
of subchannels.