##################### Automatic Idempotency ##################### .. automatic-idempotency: .. warning :: Automatic idempotency is currently experimental and not recommended for use in production. Synopsis ~~~~~~~~ Use the ``automatic_idempotency`` transaction option to prevent commits from failing with ``commit_unknown_result`` at a small performance cost. ``transaction_timed_out`` and ``cluster_version_changed`` still indicate an unknown commit status. Details ~~~~~~~ Transactions are generally run in retry loops that retry the error ``commit_unknown_result``. When an attempt fails with ``commit_unknown_result`` it's possible that the attempt succeeded, and the retry will perform the effect of the transaction twice! This behavior can be surprising at first, and difficult to reason about. As an example, consider this simple transaction:: @fdb.transactional def atomic_increment(tr, key): tr.add(key, struct.pack("