Skip to content

fix(spanner): fail fast when inline-begin DML returns no transaction id#13536

Merged
rahul2393 merged 1 commit into
mainfrom
fix-inline-begin-missing-txn-id
Jun 22, 2026
Merged

fix(spanner): fail fast when inline-begin DML returns no transaction id#13536
rahul2393 merged 1 commit into
mainfrom
fix-inline-begin-missing-txn-id

Conversation

@rahul2393

Copy link
Copy Markdown
Contributor

Sync executeUpdate/executeBatchUpdate and async batchUpdateAsync left transactionIdFuture unresolved when a begin-requesting DML response carried no transaction metadata, so commit blocked on the 60s wait and surfaced DEADLINE_EXCEEDED. Mirror executeUpdateAsync: raise FAILED_PRECONDITION via onError so the future resolves and the transaction retries or propagates. Use getId().isEmpty() consistently and add regression coverage via a mock omit-transaction hook.

Sync executeUpdate/executeBatchUpdate and async batchUpdateAsync left transactionIdFuture unresolved when a begin-requesting DML response carried no transaction metadata, so commit blocked on the 60s wait and surfaced DEADLINE_EXCEEDED. Mirror executeUpdateAsync: raise FAILED_PRECONDITION via onError so the future resolves and the transaction retries or propagates. Use getId().isEmpty() consistently and add regression coverage via a mock omit-transaction hook.
@rahul2393 rahul2393 requested review from a team as code owners June 22, 2026 11:14

@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 refactors the handling of inline begin transactions in TransactionRunnerImpl by introducing helper methods to check for non-empty transaction IDs and enforce that a transaction is returned when expected. It also updates tests in InlineBeginTransactionTest to use a shorter transaction wait timeout, and refactors MockSpannerServiceImpl to conditionally omit transaction metadata when simulating inline begin transaction omissions. There are no review comments, so I have no feedback to provide.

@rahul2393 rahul2393 merged commit 94315ce into main Jun 22, 2026
182 checks passed
@rahul2393 rahul2393 deleted the fix-inline-begin-missing-txn-id branch June 22, 2026 13:11
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