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

datastore: mark failed rollbacks as finalized #240

Merged

Conversation

stephenplusplus
Copy link
Contributor

If an error occurs upstream while trying to rollback a
transaction, we can mark the transaction as finalized
regardless. By marking it finalized, we don't then
later make an accidental commit when done is
executed.

Fixes #237

@ryanseys
Copy link
Contributor

LGTM.

@@ -124,11 +124,11 @@ Transaction.prototype.rollback = function(callback) {
var req = new pb.RollbackRequest({ transaction: this.id });
var res = pb.RollbackResponse;
this.makeReq('rollback', req, res, function(err) {
that.isFinalized = true;
if (err) {

This comment was marked as spam.

This comment was marked as spam.

If an error occurs upstream while trying to rollback a
transaction, we can mark the transaction as `finalized`
regardless. By marking it `finalized`, we don't then
later make an accidental commit when `done` is
executed.

Fixes googleapis#237
stephenplusplus added a commit that referenced this pull request Sep 30, 2014
datastore: mark failed rollbacks as finalized
@stephenplusplus stephenplusplus merged commit ec76344 into googleapis:master Sep 30, 2014
chingor13 pushed a commit that referenced this pull request Aug 22, 2022
sofisl pushed a commit that referenced this pull request Oct 12, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json [ci skip]
sofisl pushed a commit that referenced this pull request Oct 13, 2022
* chore(deps): upgrade gapic-generator-java to 2.4.1

PiperOrigin-RevId: 422607515

Source-Link: googleapis/googleapis@ba2ffd6

Source-Link: googleapis/googleapis-gen@73ba4ad
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
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>
sofisl pushed a commit that referenced this pull request Nov 11, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 11, 2022
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/cacd5a12-e156-415f-94a2-533984f6802a/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@363fe30
sofisl pushed a commit that referenced this pull request Nov 11, 2022
…lates (#240)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/5e903fff-57bb-4395-bb94-8b4d1909dbf6/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@21f1470
Source-Link: googleapis/synthtool@388e10f
sofisl pushed a commit that referenced this pull request Nov 11, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ts-loader](https://github.com/TypeStrong/ts-loader) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/ts-loader/8.1.0/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/compatibility-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/confidence-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>TypeStrong/ts-loader</summary>

### [`v9.0.0`](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v900)

[Compare Source](https://github.com/TypeStrong/ts-loader/compare/v8.1.0...v9.0.0)

Breaking changes:

-   minimum webpack version: 5
-   minimum node version: 12

Changes:

-   [webpack 5 migration](https://github.com/TypeStrong/ts-loader/pull/1251) - thanks [@&#8203;johnnyreilly](https://github.com/johnnyreilly), [@&#8203;jonwallsten](https://github.com/jonwallsten), [@&#8203;sokra](https://github.com/sokra), [@&#8203;appzuka](https://github.com/appzuka), [@&#8203;alexander-akait](https://github.com/alexander-akait)

</details>

---

### Configuration

:date: **Schedule**: "after 9am and before 3pm" (UTC).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-secret-manager).
sofisl pushed a commit that referenced this pull request Nov 11, 2022
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 468790263

Source-Link: googleapis/googleapis@873ab45

Source-Link: googleapis/googleapis-gen@cb6f37a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9
sofisl pushed a commit that referenced this pull request Nov 11, 2022
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 468735472

Source-Link: googleapis/googleapis@cfa1b37

Source-Link: googleapis/googleapis-gen@09b7666
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9
sofisl pushed a commit that referenced this pull request Nov 11, 2022
sofisl pushed a commit that referenced this pull request Nov 11, 2022
sofisl pushed a commit that referenced this pull request Nov 17, 2022
sofisl pushed a commit that referenced this pull request Jan 10, 2023
sofisl pushed a commit that referenced this pull request Sep 13, 2023
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.

Commit called if rollback fails
2 participants