exchange

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

commit fd8b151a7e6689fa1105b034aa9527e1cf1c3e56
parent 2274caea40f41a3d31a0394feb69ae0ac11771a0
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  6 Aug 2026 22:48:07 +0200

handle serialization issue properly

Diffstat:
Msrc/exchange/taler-exchange-closer.c | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c @@ -351,10 +351,20 @@ expired_reserve_cb (void *cls, GNUNET_SCHEDULER_shutdown (); return GNUNET_SYSERR; } + if (GNUNET_DB_STATUS_SOFT_ERROR == qs) + { + /* Serialization failure or lost connection: the transaction is + aborted, so everything below would run on a dead transaction (and + the commit would be turned into a rollback that used to be reported + as success). Start over instead. */ + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Got DB soft error closing reserve, starting over\n"); + return GNUNET_NO; + } } if (TALER_amount_is_zero (&amount_without_fee)) { - /* Reserve balance was zero OR soft error */ + /* Reserve balance was zero. */ GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Reserve was virtually empty, moving on\n"); return GNUNET_OK;