-
Notifications
You must be signed in to change notification settings - Fork 641
datastore: transaction: only commit once #234
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
Merged
stephenplusplus
merged 1 commit into
googleapis:master
from
stephenplusplus:transaction-finalizing
Sep 19, 2014
Merged
datastore: transaction: only commit once #234
stephenplusplus
merged 1 commit into
googleapis:master
from
stephenplusplus:transaction-finalizing
Sep 19, 2014
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Contributor
Author
|
After sending this, I found some room for refactoring. But, the process will still be the same, so don't worry about waiting to review |
Contributor
|
LGTM, feel free to merge. |
Contributor
Author
|
My idea for refactoring quickly made testing more complicated. Will revisit after @ryanseys's API overhaul. |
stephenplusplus
added a commit
that referenced
this pull request
Sep 19, 2014
datastore: transaction: only commit once
sofisl
pushed a commit
that referenced
this pull request
Sep 27, 2022
4 tasks
4 tasks
sofisl
pushed a commit
that referenced
this pull request
Oct 11, 2022
4 tasks
sofisl
pushed a commit
that referenced
this pull request
Oct 12, 2022
sofisl
pushed a commit
that referenced
this pull request
Oct 12, 2022
* fix(docs): reference docs should link to section of googleapis.dev with API reference * fix(docs): make anchors work in jsdoc
This was referenced Oct 12, 2022
sofisl
pushed a commit
that referenced
this pull request
Oct 13, 2022
* changes without context
autosynth cannot find the source of changes triggered by earlier changes in this
repository, or by version upgrades to tools such as linters.
* docs: add instructions for authenticating for system tests
* docs: add instructions for authenticating for system tests
* docs: add phrasing change to README
Source-Author: sofisl <55454395+sofisl@users.noreply.github.com>
Source-Date: Mon Dec 21 13:21:29 2020 -0800
Source-Repo: googleapis/synthtool
Source-Sha: 363fe305e9ce34a6cd53951c6ee5f997094b54ee
Source-Link: googleapis/synthtool@363fe30
sofisl
pushed a commit
that referenced
this pull request
Oct 13, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
4 tasks
sofisl
pushed a commit
that referenced
this pull request
Oct 13, 2022
sofisl
pushed a commit
that referenced
this pull request
Oct 13, 2022
sofisl
pushed a commit
that referenced
this pull request
Nov 9, 2022
This was referenced Nov 9, 2022
GautamSharda
pushed a commit
that referenced
this pull request
Jan 14, 2026
GautamSharda
pushed a commit
that referenced
this pull request
Jan 20, 2026
GautamSharda
pushed a commit
that referenced
this pull request
Jan 21, 2026
4 tasks
4 tasks
sofisl
pushed a commit
that referenced
this pull request
Jan 27, 2026
This was referenced Jan 27, 2026
sofisl
pushed a commit
that referenced
this pull request
Jan 27, 2026
This was referenced Jan 27, 2026
miguelvelezsa
pushed a commit
that referenced
this pull request
Jan 28, 2026
This was referenced Jan 29, 2026
GautamSharda
pushed a commit
that referenced
this pull request
Feb 2, 2026
4 tasks
sofisl
pushed a commit
that referenced
this pull request
Feb 3, 2026
4 tasks
4 tasks
GautamSharda
pushed a commit
that referenced
this pull request
Feb 3, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed an issue when trying to work with transactions. Here was my code that wasn't working:
This would cause:
Behind the scenes,
transaction.delete()made thecommitAPI call with my delete request successfully. However, when I calldone(), that runsTransaction.prototype.finalize, which will try to make another API call tocommitbecause nothing marked my transactional operation asfinalized.this.isFinalizedis currently only set after atransaction.rollback()ortransaction.commit(). This PR setsisFinalized = truefromdeleteandsaveas well, if the request is transactional.