Skip to content

Conversation

@ejona86
Copy link
Member

@ejona86 ejona86 commented Jan 29, 2025

Setting the authority is only useful when creating a real stream, as there will be a following pick otherwise. In addition, DelayedStream will buffer each call to setAuthority() in a list and we don't want that memory usage. Note that no LBs are using this feature yet, so users would not have been exposed to the memory use.

We also needed to setAuthority() when the LB selected a subchannel on the first pick attempt.


I noticed this while reviewing #11851

Setting the authority is only useful when creating a real stream, as
there will be a following pick otherwise. In addition, DelayedStream
will buffer each call to setAuthority() in a list and we don't want that
memory usage. Note that no LBs are using this feature yet, so users
would not have been exposed to the memory use.

We also needed to setAuthority() when the LB selected a subchannel on
the first pick attempt.
@ejona86 ejona86 requested a review from kannanjgithub January 29, 2025 22:30
@ejona86 ejona86 merged commit 90aefb2 into grpc:master Jan 30, 2025
15 of 16 checks passed
@ejona86 ejona86 deleted the core-setauthority-once branch January 30, 2025 16:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2025
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