Skip to content

feat(spanner): enable client to server compression#7899

Merged
rahul2393 merged 3 commits intomainfrom
client-to-server-compression
May 19, 2023
Merged

feat(spanner): enable client to server compression#7899
rahul2393 merged 3 commits intomainfrom
client-to-server-compression

Conversation

@rahul2393
Copy link
Copy Markdown
Contributor

Enable compression of network traffic from client to server.

@rahul2393 rahul2393 requested review from a team May 9, 2023 06:37
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label May 9, 2023
@rahul2393 rahul2393 requested a review from olavloite May 9, 2023 06:37
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label May 9, 2023
@rahul2393 rahul2393 added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed api: spanner Issues related to the Spanner API. labels May 9, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 9, 2023
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label May 9, 2023
Copy link
Copy Markdown
Contributor

@olavloite olavloite left a 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)

internaloption.EnableDirectPath(true),
}
if compression == "gzip" {
clientDefaultOpts = append(clientDefaultOpts, option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the unit test for checking the request headers, also adding screenshot to verify all the grpc requests will have the call option for setting compression
Screenshot 2023-05-19 at 11 55 13 AM

Copy link
Copy Markdown
Contributor

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!

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels May 19, 2023
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 19, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 19, 2023
@rahul2393 rahul2393 merged commit 3a047d2 into main May 19, 2023
@rahul2393 rahul2393 deleted the client-to-server-compression branch May 19, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants