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

xds/clusterimpl: fix SubConn wrapper returned by picker during race #4876

Merged
merged 1 commit into from Oct 15, 2021

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Oct 14, 2021

The previous logic is that the picker updated with a non-Ready state
should always return error, so the clusterimpl picker doesn't try to
unwrap the SubConn.

The assumption is not true, in cases like ring_hash (where the picker is
mutable, and could start to return SubConns before the overall state is
updated to Ready during races).

fixes #4778

RELEASE NOTES: N/A

@menghanl menghanl requested a review from easwars October 14, 2021 21:47
@menghanl menghanl added this to the 1.42 Release milestone Oct 14, 2021
@easwars easwars assigned menghanl and unassigned easwars Oct 14, 2021
… returned by picker during race

The previous logic is that the picker updated with a non-Ready state
should always return error, so the clusterimpl picker doesn't try to
unwrap the SubConn.

The assumption is not true, in cases like ring_hash (where the picker is
mutable, and could start to return SubConns before the overall state is
updated to Ready during races).
@menghanl menghanl force-pushed the clusterimpl_pick_sc_wrong_type branch from 628a269 to 42d071f Compare October 15, 2021 17:02
@menghanl menghanl merged commit 3db1cb0 into grpc:master Oct 15, 2021
@menghanl menghanl deleted the clusterimpl_pick_sc_wrong_type branch October 15, 2021 17:15
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test: Test/ClientSideAffinitySanityCheck
2 participants