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

grpc: handle invalid service configs by applying the default, if applicable #5238

Merged
merged 1 commit into from Mar 16, 2022

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Mar 11, 2022

If the name resolver returns an invalid service config, and if there is no current service config on the channel, this PR attempts to apply the default service config, if one is available.

This aligns grpc-go with https://github.com/grpc/proposal/blob/master/A21-service-config-error-handling.md, specifically #4.2

This PR also makes the following changes:

  • handle nil receiver in ccBalancerWrapper
  • remove cc.balancerWrapper != nil checks before calling methods on the balancerWrapper
  • use cc.sc != nil as the condition representing presence of current service config instead of cc.balancerWrapper != nil

RELEASE NOTES:

  • handle invalid service configs by applying the default, if applicable

@dfawley dfawley assigned easwars and unassigned dfawley Mar 16, 2022
@easwars easwars merged commit c4cabf7 into grpc:master Mar 16, 2022
10 checks passed
@easwars easwars deleted the sc_follow_pseudo_code branch Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants