-
Notifications
You must be signed in to change notification settings - Fork 1.5k
datastore: RunInTransaction() does not pass previous transaction ID on retry #1137
Copy link
Copy link
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.