-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter stack: pass peer name up via recv_initial_metadata batch (#31933)
Currently, the peer name is returned with the completion of the send_initial_metadata op, which does not make sense, because with retries, we don't actually know the peer name until we complete the recv_initial_metadata op. This PR changes our code to return the peer string as an attribute of the recv_initial_metadata op, so that it is not available to the application until that point. This change may be user-visible, but since our API docs don't seem to guarantee exactly when this data will be available, it's not technically a breaking change. Note that in the promise-based stack, we were already assuming that the peer string would be returned as part of the recv_initial_metadata batch, so this PR helps reduce risk for the promise conversion by making this semantic change now, thus decoupling it from the promise conversion. I have also changed the representation of the string in the metadata batch to be a `grpc_core::Slice` instead of a `std::string`, so that we can just take a ref to the string held in the transport instead of having to copy the whole string for every call.
- Loading branch information
Showing
26 changed files
with
147 additions
and
182 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.