Repository navigation
Commit called if rollback fails #237
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
Description
Activity
- addedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
on Sep 22, 2014 You're right. If the rollback fails, when
Transaction.prototype.finalizegets called, it won't see that a rollback was attempted, and it will try to commit. Your suggested fix sounds good to me.- added 2 commits that reference this issue
on Sep 23, 2014 - added 2 commits that reference this issue
on Sep 23, 2014 - addedapi: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
on Feb 2, 2015 - changed the title
[-]bug(datastore): commit called if rollback fails[/-][+]Commit called if rollback fails[/+]on Feb 2, 2015 - addedtriage meI really want to be triaged.I really want to be triaged.🚨This issue needs some love.This issue needs some love.
on Apr 6, 2020 29 remaining items
- added 2 commits that reference this issue
on Feb 4, 2026 - added a commit that references this issue
on Feb 17, 2026 - added 2 commits that reference this issue
on Feb 24, 2026 - added a commit that references this issue
on Mar 5, 2026 - added a commit that references this issue
on Mar 5, 2026 - added a commit that references this issue
on Mar 12, 2026 - added 2 commits that reference this issue
on Mar 23, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
I believe I am reading the code correctly (please close this if I'm not!) -- based on the docs for transactions I should do something like this:
However if the rollback fails, we'll call
donewithout ever settingisFinalized = true. I believe this means we'll then try to commit the transaction, which doesn't seem like the desired outcome. It's ok to just not rollback the transaction, eventually it will expire, so rollback should always immediately setisFinalized = true.Also I'm not sure if this gets fixed at all by the refactor that's currently happening with Transaction.