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: fix a bug in handling server address updates. #2754

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

zhangkun83
Copy link
Contributor

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.

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.
@dapengzhang0
Copy link
Member

I remember I had a comment on this before in #2557 and you replied

Duplicate EAGs from the balancer are intentionally preserved. They are used to distribute load unevenly across backends, a.k.a. weighted round-robin.

Was that the same concern as this PR?

@dapengzhang0
Copy link
Member

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 =
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@dapengzhang0 dapengzhang0 left a 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

@zhangkun83 zhangkun83 merged commit 2fab889 into grpc:master Mar 1, 2017
@zhangkun83 zhangkun83 deleted the grpclb_bug branch March 1, 2017 18:47
@dapengzhang0
Copy link
Member

ref #2772

@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants