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: Check for validity of xdsClient in ClusterImplLbHelper (v1.67.x backport) #11554

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

DNVindhya
Copy link
Contributor

This PR adds null check for xdsClient in onSubChannelState.
This avoids NPE for xdsClient when LB is shutdown and onSubChannelState is called later as part of listener callback. As shutdown is racy and eventually consistent, this check would avoid calculating locality after LB is shutdown.

b/369220083

Backport of #11553

CC @apolcyn

* Added null check for xdsClient in onSubChannelState. This avoids NPE
for xdsClient when LB is shutdown and onSubChannelState is called later
as part of listener callback. As shutdown is racy and eventually consistent,
this check would avoid calculating locality after LB is shutdown.
@DNVindhya DNVindhya requested a review from ejona86 September 24, 2024 23:33
@DNVindhya DNVindhya merged commit 67cab18 into grpc:v1.67.x Sep 25, 2024
15 checks passed
@DNVindhya DNVindhya deleted the backport-1.67-fix_wrr_npe branch September 25, 2024 17:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants