Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(spanner): add support for change streams transaction exclusion option #9779

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

ShuranZhang
Copy link
Contributor

@ShuranZhang ShuranZhang commented Apr 15, 2024

Add support for excluding transactions from being recorded in the change streams by passing a new boolean option ExcludeTxnFromChangeStreams in the various write APIs:

  • Apply
  • ApplyAtLeastOnce
  • ReadWriteTransactionWithOptions
  • BtachWriteWithOptions
  • PartitionedUpdateWithOptions

This pr follows the exact same design with the merged Java client lib pr for this feature at googleapis/java-spanner#2959 including error handling.
Passing this option to a request level DML request will receive an error errExcludeRequestLevelDmlFromChangeStreams. This new option is added to struct QueryOptions, but it can only be used for PartitionedUpdate API.

Note: Samples will be added later in separate prs.

@ShuranZhang ShuranZhang requested review from a team as code owners April 15, 2024 21:30
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Apr 15, 2024
spanner/transaction.go Outdated Show resolved Hide resolved
spanner/client.go Outdated Show resolved Hide resolved
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 22, 2024
@rahul2393 rahul2393 enabled auto-merge (squash) April 22, 2024 06:13
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 22, 2024
@rahul2393 rahul2393 changed the title feat(spanner):add support for change streams transaction exclusion option feat(spanner): add support for change streams transaction exclusion option Apr 22, 2024
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 22, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 22, 2024
@rahul2393 rahul2393 merged commit 979ce94 into googleapis:main Apr 22, 2024
8 checks passed
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants