2
votes

The Google App Engine documentation at https://developers.google.com/appengine/docs/java/datastore/transactions says this:

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.

What is the proper way to recover from a commit exception if the transaction is not idempotent?

1

1 Answers

0
votes

I think what you do is show the end user an error with a link they can use to view the state of their world. Then the end user can decide whether to resubmit. E.g. if they post a comment to a blog and the post somehow reports an error, they can re-load the blog page and see if their comment is there; if they see it's not, they can (hopefully) recover it from their browser history and resubmit.