feat(firestore): configure client to support 16MB documents#14684
Open
bhshkh wants to merge 2 commits into
Open
feat(firestore): configure client to support 16MB documents#14684bhshkh wants to merge 2 commits into
bhshkh wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request configures the Firestore client to support larger payloads by setting the gRPC maximum send and receive message sizes to math.MaxInt32 for both emulator and standard connections. It also introduces an integration test to verify these limits. Feedback on the changes suggests simplifying the test by removing the unnecessary error check for rand.Read, which is guaranteed to succeed.
hongalex
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configures the underlying gRPC client to explicitly support sending and receiving messages up to
math.MaxInt32bytes. This enables support for larger documents (up to 16MB) in the Go Firestore SDK.Current Limits (Without this PR)
math.MaxInt32in the auto-generatedapiv1client.grpc-golibrary implementation defaults to unlimited (math.MaxInt32) for client-side sending, explicitly setting it tomath.MaxInt32ensures robustness against future gRPC default changes and aligns with the expected behavior across other Firestore SDKs (which may have a 4MB default send limit).Changes
This PR explicitly configures both
MaxCallRecvMsgSizeandMaxCallSendMsgSizetomath.MaxInt32inclient.goto guarantee support for large payloads.Also adds a regression test in
integration_test.go:TestIntegration_VerifyGRPCLimits: Verifies the client can send and receive a 5MB payload (exceeding the default 4MB gRPC limits) using non-compressible random bytes. It asserts that both the write (Set) and read (Get) operations succeed.Fixes : b/452640794