Return stream after server response only
- Dominant language
- Rust
- Stars
- 12.5k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 24
Description
## Bug Report
### Version
rekby@rekby-osx:~/p/y/ydb-rs-sdk|master⚡*
➤ cargo tree | grep tonic
├── tonic v0.8.2
└── tonic v0.8.2 (*)
├── tonic-build v0.8.0
### Crates
tonic
### Description
While tonic create bidirectional stream - it [wait first server response](https://github.com/hyperium/tonic/blob/a7e29c9213bb4903c0ee7bbae959f94e539116fd/tonic/src/client/grpc.rs#L236) before return response stream.
Tonic's implementation of server always return empty message with code 200 after init grpc stream, but some servers (in my case YDB server) not sent status code until first message. But the server wait init message from client.
It make impossible create empty streams and sent init response in usual way. Now workaround - create stream with initial message in input stream.
Other languages (go, python) allow to create stream without wait initial status response and work with same server good.
GRPC doc:
https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc
The server can choose to send back its initial metadata or wait for the client to start streaming messages.
Contributor guide
Assessment
This issue has not been assessed yet.