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

Fix first ready bug #401

Closed
wants to merge 1 commit into from
Closed

Fix first ready bug #401

wants to merge 1 commit into from

Conversation

henryr
Copy link

@henryr henryr commented Jun 5, 2024

Fix the bug in first_ready where the builder only selects a target from one pool.

We let the picker do the picking, by pushing down the list of ready subconns into the picker. The picker always returns the same subconn from that list, unless there's an error on an RPC, in which case the index is advanced and the next subconn is used. This is very similar to the round_robin implementation.

This has the advantage that RPC errors are detected and mitigated in-line, rather than waiting for service discovery to tell us about a change in the set of healthy subconns.

One improvement we should make is that the subconn is chosen randomly initially after every call to Build for the same target; we should sort the list of conns by something stable.

Signed-off-by: Henry Robinson <[email protected]>
@henryr henryr closed this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant