balancer/weightedroundrobin: Switch Weighted Round Robin to use pick first instead of SubConns#7826
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7826 +/- ##
==========================================
- Coverage 81.84% 81.82% -0.03%
==========================================
Files 373 375 +2
Lines 37845 37984 +139
==========================================
+ Hits 30976 31082 +106
- Misses 5578 5590 +12
- Partials 1291 1312 +21
|
dfawley
reviewed
Nov 11, 2024
Member
|
LGTM modulo the one issue mentioned above. |
Contributor
Author
|
Got to the two points we discussed in our 1:1. |
dfawley
approved these changes
Nov 22, 2024
dfawley
left a comment
Member
There was a problem hiding this comment.
Two minor requests, otherwise LGTM. Thanks!
| return nil, err | ||
| } | ||
| b.scToWeight[sc] = ewi.(*endpointWeight) | ||
| return sc, err |
Member
There was a problem hiding this comment.
nil explicitly, please, since you asserted err == nil already.
| } | ||
|
|
||
| func (p *picker) start(ctx context.Context) { | ||
| func (p *picker) start(done *grpcsync.Event) { |
Member
There was a problem hiding this comment.
stopPicker so the name is consistent?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR switches weighted round robin to defer to pick first instead of creating and handling SubConns itself. This is part of DualStack, and makes this a petiole.
RELEASE NOTES: