apache / couchdb-erlfdb

Erlang API for FoundationDB
https://www.foundationdb.org
Apache License 2.0
28 stars 20 forks source link

Do not create a new transaction object during retries #1

Closed nickva closed 4 years ago

nickva commented 4 years ago

on_error function automatically resets the transaction object but preserves retry and backoff-related information in the object. Avoid creating a new transaction object which would lose that context in case transactions retry more than 2 times.

Reference: https://apple.github.io/foundationdb/api-c.html#c.fdb_transaction_on_error