0

From App Engine doc on transaction:

Note: In extremely rare cases, the transaction is fully committed even if a transaction
returns a timeout or internal error exception. For this reason, it's best to make transactions
idempotent whenever possible.

Suppose in a situation A transfers money to another person B, the operations should be in a transaction, if the above Note did occur, then it will be in inconsistent state, (the transfer action can not be idempotent). Is my understanding correct?

July
  • 855
  • 4
  • 11
  • 22
  • 2
    Have a read up and distributed transactions and roll forwards transactions by Nick Johnson - http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine the examples are in Python but it should be very straight forward to translate this to Java. And its worth reading through all the comments after the article, some interesting corner cases are covered. – Tim Hoffman Feb 26 '14 at 14:57

1 Answers1

0

You would need to make such a transaction idempotent. See this earlier StackOverflow item for a much deeper description of the issue and resolutions: GAE transaction failure and idempotency

Community
  • 1
  • 1
ErstwhileIII
  • 4,829
  • 2
  • 23
  • 37