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): implement at-least-once Commit #11899

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

devbww
Copy link
Contributor

@devbww devbww commented Jun 15, 2023

Add a new operation, spanner::Client::CommitAtLeastOnce(), with all its caveats, that exposes the single-RPC, temporary-transaction commit support.

Fixes #4890.


This change is Reviewable

Add a new operation, `spanner::Client::CommitAtLeastOnce()`, with all
its caveats, that exposes the single-RPC, temporary-transaction commit
support.

Fixes googleapis#4890.
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Jun 15, 2023
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Patch coverage: 89.06% and project coverage change: -0.01 ⚠️

Comparison is base (1145a8c) 93.66% compared to head (472c94c) 93.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11899      +/-   ##
==========================================
- Coverage   93.66%   93.66%   -0.01%     
==========================================
  Files        1838     1838              
  Lines      166240   166358     +118     
==========================================
+ Hits       155711   155815     +104     
- Misses      10529    10543      +14     
Impacted Files Coverage Δ
google/cloud/spanner/client.h 100.00% <ø> (ø)
...anner/integration_tests/client_integration_test.cc 86.39% <77.77%> (-0.32%) ⬇️
google/cloud/spanner/client_test.cc 95.72% <83.78%> (-0.63%) ⬇️
google/cloud/spanner/internal/connection_impl.cc 94.66% <88.88%> (-0.24%) ⬇️
google/cloud/spanner/client.cc 98.11% <100.00%> (+0.06%) ⬆️
...gle/cloud/spanner/internal/connection_impl_test.cc 98.29% <100.00%> (+0.02%) ⬆️
google/cloud/spanner/transaction.cc 96.90% <100.00%> (+0.27%) ⬆️
google/cloud/spanner/transaction.h 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@devbww devbww marked this pull request as ready for review June 15, 2023 05:15
@devbww devbww requested a review from a team as a code owner June 15, 2023 05:15
*
* @note Prefer the `Commit` overloads if you want exactly-once semantics
* or want to reapply mutations after a `kAborted` error.
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a really simple example using this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I'll add one in a follow-up.

@coryan coryan added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 15, 2023
@devbww devbww removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 16, 2023
@devbww devbww merged commit dcc823e into googleapis:main Jun 16, 2023
@devbww devbww deleted the commit-single-use branch June 16, 2023 02:39
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.

Implement non-idempotent Commit (write at least once).
2 participants