Skip to content

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

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 Python SDK to differentiate transactional requests and non-transactional requests from firestore. Having a routing header for transactions helps in routing grpc requests at GFE.

Add x-goog-is-transaction routing header in Python SDK to differentiate transactional requests and non-transactional requests from firestore. Having a routing header for transactions helps in routing grpc requests at GFE.
@nikhilchowdary
nikhilchowdary requested a review from a team as a code owner October 17, 2026 07:47

@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 introduces transactional RPC metadata to the Firestore client, ensuring that RPC requests executed within a transaction include the x-goog-is-transaction header. This is achieved by updating the metadata helper, client classes, queries, and transaction managers to conditionally supply _transaction_rpc_metadata when a transaction is active. However, a critical issue was identified in pipeline_result.py where accessing self.transaction instead of the internal self._transaction attribute will raise an AttributeError at runtime in both the synchronous and asynchronous iterator implementations.

nikhilchowdary and others added 2 commits October 17, 2026 00:51
…line_result.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…line_result.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@parthea parthea self-assigned this Oct 17, 2026

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.

2 participants