Search code examples
google-cloud-datastoredistributed-transactions

Understanding what operation types will cause a failed transaction in GAE datastore


After reading the documentation, there is one thing that is not completely clear to me, I am hoping someone can clarify.

Obviously if you have two read-then-write transactions that occur concurrently, one of them will fail. However, if you have one read-then-write transaction in progress, and then another read occurs that was not part of a transaction, will that other non transactional read cancel the transaction, i.e. A transaction to read-then-write on a payment/transaction record should not be cancelled by the non transactional "Get all payment data" report. Is that correct?


Solution

  • Yes, that's correct. Non-transactional reads and read-only transactions do not contend with read-then-write transactions.