blocking stub v2 server streaming calls sometimes require .read() to initiate request
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
If the channel is in an idle state when `ClientCalls.blockingV2ServerStreamingCall` is invoked, sending the request will be queued up in `DelayedClientTransport`. When the connection is set up, `DelayedClientTransport` will run all the deferred request initiation steps on the call executor: https://github.com/grpc/grpc-java/blob/b88536a17d320065a972858e17e44e1e5c656a0f/core/src/main/java/io/grpc/internal/DelayedClientTransport.java#L306-L312 Unfortunately, the call executor for the blocking v2 stubs is a `ThreadSafeThreadlessExecutor`, which means the headers and request aren't actually sent until the client calls `.read()` on the `BlockingClientCall`.
In contrast, the blocking v1 stub always sent the request as soon as possible.
Contributor guide
Assessment
This issue has not been assessed yet.