Skip to content

datastore: RunInTransaction() does not pass previous transaction ID on retry #1137

@havardk

Description

@havardk

The datastore client's RunInTransaction() contains this piece of code that seems to pass down the previous transaction id when retrying a transaction because it previously conflicted with another transaction:
https://github.com/GoogleCloudPlatform/google-cloud-go/blob/8c9fc24c2b85cbc71e8f1dbb6b7ac70a20bfe1c2/datastore/transaction.go#L176-L180

However, just before this code we call Transaction.Commit() and after Commit(), the transaction id is always nil. I'm not sure what the backend does with this data, but this code should either be fixed or removed.

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions