client: don't reuse a pick's authority override on a later attempt - #9277
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9277 +/- ##
==========================================
- Coverage 83.14% 83.08% -0.07%
==========================================
Files 422 423 +1
Lines 34862 35322 +460
==========================================
+ Hits 28985 29346 +361
- Misses 4385 4451 +66
- Partials 1492 1525 +33
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Hi @nvxbug , Thank you for raising a PR.
I have added some comments, PTAL.
Pranjali-2501
approved these changes
Aug 18, 2026
easwars
approved these changes
Aug 18, 2026
Contributor
|
@nvxbug : Thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
csAttempt.newStreamwrites the gRFC A81 authority override from the pick result intocs.callHdr, which is allocated once perclientStreamand shared by everyattempt. Nothing clearsAuthoritybetween attempts, so once an attempt is picked to an endpoint that carries a hostname, a retry whose own pick supplies no override still goes out with the earlier endpoint's authority. An xDS cluster usingauto_host_rewritewhose endpoints do not all set hostname hits this on any retry, and:authorityis what selects the virtual host and what RBAC host matchers run against on the receiving side.Copy the call header per attempt so the override, like
PreviousAttempts, stays with the attempt that produced it. The value is derived from that attempt's pick result, so the attempt is the right scope for it; leaving it on the stream lets one endpoint's rewrite outlive the pick that asked for it.RELEASE NOTES:
:authorityvalue belonging to the endpoint chosen by an earlier attempt, when a load balancer supplies an authority override (e.g. xDSauto_host_rewrite)