google-app-engineconcurrencybigtable

In a BigTable datastore, with regards to concurrency, how do I "lock" an entity?


I am not sure how to handle this in a BigTable datastore.

Imagine the following example (just to explain the concept. The example does not match my actual data model):

The counter value is now inaccurate. It should be 102.

Any suggestions on how to handle this situation? Can I 'lock' the counter to ensure that the second web request doesn't even read it until the first web request completes?


Solution

  • You have several options: