exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 872de5769e6f699b59e438d9b04032580a1f3c99
parent ba69ba689f60213f8c8a2433fd84d6f3319afd84
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Mon, 17 Aug 2026 15:17:40 +0200

properly re-try on serialization failure

Diffstat:
Msrc/auditor/report-lib.c | 20++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/auditor/report-lib.c b/src/auditor/report-lib.c @@ -441,7 +441,7 @@ enum GNUNET_GenericReturnValue TALER_ARL_setup_sessions_and_run (TALER_ARL_Analysis ana, void *ana_cls) { - enum GNUNET_DB_QueryStatus qs; + enum GNUNET_GenericReturnValue ret; if (GNUNET_SYSERR == TALER_EXCHANGEDB_preflight (TALER_ARL_edb)) @@ -458,15 +458,23 @@ TALER_ARL_setup_sessions_and_run (TALER_ARL_Analysis ana, return GNUNET_SYSERR; } - for (unsigned int retries=0; retries<3; retries++) + for (unsigned int retries = 0; retries<3; retries++) { - qs = transact (ana, - ana_cls); - if (GNUNET_DB_STATUS_SOFT_ERROR != qs) + ret = transact (ana, + ana_cls); + if (GNUNET_NO != ret) break; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Serialization issue, trying again\n"); } - if (qs < 0) + if (GNUNET_OK != ret) + { + /* Includes the retries running out: the analysis was rolled back every + time, so there is nothing committed to report success about. */ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Analysis failed, not recording progress\n"); return GNUNET_SYSERR; + } return GNUNET_OK; }