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?