-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grpc-rs doesn't compress response when client sent a compressed request #534
Comments
Can you provide a minimal reproduce example? Server won't compress response if the compression algorithm is not supported. |
yes, we could use https://github.com/lysu/grpc-go/blob/dev-test/examples/helloworld/greeter_client/main.go as client... and as server.. and check server response by set breakpoint on google.golang.org/grpc.recvAndDecompress at rpc_util.go:703, and watch if server is rust, I also try to |
After commenting following line, the official cpp version of compression example also doesn't compress the response: https://github.com/grpc/grpc/blob/master/examples/cpp/compression/greeter_server.cc#L44 It seems one has to set the compression type in server side to make it work. The cookbook https://github.com/grpc/grpc/blob/master/doc/compression_cookbook.md also doesn't have a clear statement that server response will use the same compression algorithm as client. The only one clear rule I can find is from go-grpc's documentation, which is a different implementation. https://github.com/grpc/grpc-go/blob/master/Documentation/compression.md#server-side |
tidb will use grpc to communicate with both tikv and other tidb.
when investigating an issue we found that only tidb->tidb got empty result due to grpc/grpc-go#4552
but tikv works well, after more investigation it seems tikv server doesn't give a compressed response like grpc-go does, grpc-go seems response compressed data when client seen compressed data even if it doesn't enable compress in server-side.
I'm not sure is it a problem, ptal~
The text was updated successfully, but these errors were encountered: