-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(spanner): enable client to server compression #7899
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (with a potential request for a test), assuming that it has been verified that the setting actually has an effect (e.g. by looking at the actual number of bytes sent/received)
spanner/client.go
Outdated
generatedDefaultOpts := vkit.DefaultClientOptions() | ||
clientDefaultOpts := []option.ClientOption{ | ||
option.WithGRPCConnectionPool(numChannels), | ||
option.WithUserAgent(fmt.Sprintf("spanner-go/v%s", internal.Version)), | ||
internaloption.EnableDirectPath(true), | ||
} | ||
if compression == "gzip" { | ||
clientDefaultOpts = append(clientDefaultOpts, option.WithGRPCDialOption(grpc.WithDefaultCallOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add a test with the mock Spanner server that verifies that we actually receive this header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the extra info and adding the test. LGTM!
Enable compression of network traffic from client to server.