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

core: Fully delegate picks to DelayedClientTransport #11206

Merged
merged 1 commit into from
May 14, 2024

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented May 13, 2024

DelayedClientTransport already had to handle all the cases, so ManagedChannelImpl picking was acting only as an optimization. Optimizing DelayedClientTransport to avoid the lock when not queuing makes ManagedChannelImpl picking entirely redundant, and allows us to remove the duplicate race-handling logic.

This avoids double-picking when queuing, where ManagedChannelImpl does a pick, decides to queue, and then DelayedClientTransport re-performs the pick because it doesn't know which pick version was used. This was noticed with RLS, which mutates state within the picker.

DelayedClientTransport already had to handle all the cases, so
ManagedChannelImpl picking was acting only as an optimization.
Optimizing DelayedClientTransport to avoid the lock when not queuing
makes ManagedChannelImpl picking entirely redundant, and allows us to
remove the duplicate race-handling logic.

This avoids double-picking when queuing, where ManagedChannelImpl does a
pick, decides to queue, and then DelayedClientTransport re-performs the
pick because it doesn't know which pick version was used. This was
noticed with RLS, which mutates state within the picker.
@ejona86 ejona86 requested a review from larry-safran May 13, 2024 23:37
@ejona86 ejona86 merged commit 8844cf7 into grpc:master May 14, 2024
13 checks passed
@ejona86 ejona86 deleted the avoid-double-pick branch May 14, 2024 18:37
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.

None yet

2 participants