Cloud NDB - Get operation ignores transient locking failure in memcache leading to cache inconsistency #652
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 v1.8.0 with Memcache global cache
There is a sequence of steps that can lead to cache inconsistency which is caused by the read thread failing to write a lock for transient reasons. The sequence of steps is:
The problem here is that exceptions on transient failures on cache operations from reads are swallowed, which for most of the calls is fine, however very specifically for the lock call in
_datastore_api.lookup()
any exception needs to be treated as the key being locked such that it will not attempt to update memcache with a new valueThe text was updated successfully, but these errors were encountered: