-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay client async writer starting (#1531)
Motivation: It's possible for async streaming clients to fail and drop messages in some situations. The situation leading to this happens because streaming calls set up state and then write out headers. While setting up state the HTTP/2 stream channel is configured, when it becomes active gRPC calls outs to enable the async writer to start emitting writes. This can happen before the headers are written so if a write is already pending then it can race the headers being written. If the message is written first then the write promise is failed and the message is dropped. Modifications: Delay letting the async writer emit writes until the headers have been written. Result: Correct ordering is enforced.
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
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