Skip to content

feat(firestore): add x-goog-is-transaction routing header - #14680

Open
nikhilchowdary wants to merge 3 commits into
googleapis:mainfrom
nikhilchowdary:feat-firestore-tx-routing-header
Open

nikhilchowdary wants to merge 3 commits into
googleapis:mainfrom
nikhilchowdary:feat-firestore-tx-routing-header

Conversation

@nikhilchowdary

Copy link
Copy Markdown

Add x-goog-is-transaction routing header in Java SDK to differentiate transactional requests and non-transactional requests from firestore. Having a routing header for transactions helps in routing grpc requests at GFE.

Attach x-goog-is-transaction header ('true' for transactional RPCs, 'false' for non-transactional RPCs) in GrpcFirestoreRpc.
@nikhilchowdary
nikhilchowdary requested review from a team as code owners October 17, 2026 05:44

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request adds transaction-specific routing headers (x-goog-is-transaction) to various Firestore RPC callables in GrpcFirestoreRpc and introduces comprehensive unit tests to verify this behavior. The review feedback recommends refactoring the anonymous classes used for routing headers into named static nested classes. This prevents fragile reflection-based test assertions in GrpcFirestoreRpcTest from relying on compiler-generated class names like GrpcFirestoreRpc$1.

nikhilchowdary and others added 2 commits October 17, 2026 09:48
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant