Skip to content

Mismatch of transaction IDs in 'g.datastore.connection.Connecction.rollback_transaction()' #129

@tseaver

Description

@tseaver

The method first checks that a transaction exists for the connection, and that it has a truthy ID[1], but then does not use that ID when setting up the API request: instead, it uses a passed-in ID[2]. This is not the same behavior as in 'g.datastore.connection.Connecction.commit()', where the ID is used from the connection's transaction (if present)[3].

Is there a usecase for using a connection to rollback any transaction ID other than the one bound to the connection?

[1] https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/gcloud/datastore/connection.py#L176

[2] https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/gcloud/datastore/connection.py#L180

[3] https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/gcloud/datastore/connection.py#L300

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions