googleapis / googleapis/google-cloud-go

datastore: rollback when panic occurs in RunInTransaction.

Open
#5,969 0 comments 0 reactions 1 assignee Assigned to @bhshkh View on GitHub
api: datastore type: feature request
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

**Is your functional requirement relevant to the issue? Please describe.**

We would like to be `rollback` in the unlikely event of a `panic` in a `RunInTransaction`.

**Describe the solution you want.**

We want rollback using `defer` and `recover` for `f(tx)`.

https://github.com/googleapis/google-cloud-go/blob/dd8973b7f72e4b153f7f135e4af8e89c66d3666d/datastore/transaction.go#L173

**Describe alternatives you have considered.**

none

**Additional Context.**

none

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.