diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-24 13:53:09 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-24 13:53:19 +0100 |
commit | fd9ba53c492835b52bd75a5ae113b7bcc81fe161 (patch) | |
tree | ccb61b10436e0fdc5cb068595fad26e910bdabb2 /src/exchange/taler-exchange-httpd_db.h | |
parent | 10b9023575b14e581cfd952b75039e71488f5a8f (diff) |
make_coin_known can experience serialization failures, add retry logic
Diffstat (limited to 'src/exchange/taler-exchange-httpd_db.h')
-rw-r--r-- | src/exchange/taler-exchange-httpd_db.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.h b/src/exchange/taler-exchange-httpd_db.h index 7c954ffe..bca97cf0 100644 --- a/src/exchange/taler-exchange-httpd_db.h +++ b/src/exchange/taler-exchange-httpd_db.h @@ -28,6 +28,19 @@ /** + * How often should we retry a transaction before giving up + * (for transactions resulting in serialization/dead locks only). + * + * The current value is likely too high for production. We might want to + * benchmark good values once we have a good database setup. The code is + * expected to work correctly with any positive value, albeit inefficiently if + * we too aggressively force clients to retry the HTTP request merely because + * we have database serialization issues. + */ +#define MAX_TRANSACTION_COMMIT_RETRIES 100 + + +/** * Ensure coin is known in the database, and handle conflicts and errors. * * @param coin the coin to make known |