Cloud NDB - global cache lock entry deleted on put when in transaction - Regression from Legacy NDB #650
Labels
api: datastore
Issues related to the googleapis/python-ndb API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
cloud-ndb v 1.8.0
In the legacy NDB client the library correctly attempts to lock keys in memcache for the duration of the transaction. In this library
_cache.delete()
is incorrectly called in_datastore_api.put()
even when in a transaction which results in the lock being immediately deleted post put() but pre-transaction commit.The lines:
should be
EDIT (@chrisrossi ): Per discussion from #657, we actually want to move when this delete occurs to the end of the transaction, post-commit, so the fix will be somewhat more than a one-liner.
The text was updated successfully, but these errors were encountered: