Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
subset lb: allow ring hash/maglev LB to work with subsets #8030
subset lb: allow ring hash/maglev LB to work with subsets #8030
Changes from 4 commits
3390734
0908fbe
d68384f
e259f47
0bb7ed2
cd2bb3a
9cfabc6
d77bfc2
4161d82
fa295b2
b6f44cb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm also inclined to think if we're changing the thread_aware logic we should probably have an integration test for it, as I think the unit tests don't really exercise the therad-aware code. Or am I misremembering?
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.
Do you mean an integration test for subset load balancer + hash-ring or maglev? I can look at adding one.
There are integration tests exercising the hash-ring lb, but not maglev (unless I'm just not seeing 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.
yeah, basically my point is this change affects what we do in what thread, in a way that wouldn't be really exercised by unit tests, right?
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.
Added a very basic integration test.
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.
Test? (I think the one below is covered but not this one)
Also out of curiosity, what was the prior behavior if someone configured this?
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.
Turns out this isn't reachable because of the check in original_dst_cluster.cc.
From the code/comments it seemed the plan was for the original dst cluster to become a custom cluster type to be used in conjunction with
cluster_provided
lb policy. When that happens I think this case become redundant and will get removed.That said, I could remove the subset lb check in original_dst_cluster.cc in favor of this one.
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.
Yeah, I'd either suggest a TODO for you to pick up the change which clean this up, or a refactor now, rather than have redundant code in here indefinitely.
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 remove the check in the original dst LB.