Strategy / template to prevent lost update / race conditions on GAE / memcache

Example:

  • Process A - Retrieves the latest version of an object from memcache
  • Process B - gets the latest version of an object from memcache
  • Process A - does some updating for the object obtained in (1) and then putsin db / memcache
  • Process B - does some updating for the object obtained in (2) and then putsin db / memcache

Update 3. lost.

What strategy / template can be used to prevent this?

+5
source share

All Articles