-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
Area: RPC FeaturesIncludes Compression, Encoding, Attributes/Metadata, Interceptors.Includes Compression, Encoding, Attributes/Metadata, Interceptors.P2Type: Bug
Description
What version of gRPC are you using?
Found the bug in v1.70.0 and confirmed it is wtill there in the HEAD of master.
What version of Go are you using (go version
)?
go version go1.24.0 darwin/arm64
What operating system (Linux, Windows, …) and version?
Mac OS
What did you do?
Modify health example in the following way:
- Add the following 2 options on the client
grpc.WithCompressor(grpc.NewGZIPCompressor()), grpc.WithDecompressor(grpc.NewGZIPDecompressor()),
- Add the following 2 options on the server
grpc.RPCCompressor(grpc.NewGZIPCompressor()), grpc.RPCDecompressor(grpc.NewGZIPDecompressor()),
What did you expect to see?
Example working correctly
What did you see instead?
Health check failing. Client can't connect to the server.
I think I traced the issue to its root cause. If I modify this code to include decompressor provided in the options, e.g
as := &addrConnStream{
...
decompressorV0: ac.cc.dopts.dc,
}
everything is working as expected. This is not a proper fix as you also need to handle cases when compression is configured using the new API, but it should be easy to handle that.
Metadata
Metadata
Assignees
Labels
Area: RPC FeaturesIncludes Compression, Encoding, Attributes/Metadata, Interceptors.Includes Compression, Encoding, Attributes/Metadata, Interceptors.P2Type: Bug