-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
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