summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-02-29 00:56:48 +0100
committerChristian Grothoff <christian@grothoff.org>2024-02-29 00:56:48 +0100
commit295be9df8e96d55df0d58940dcfeee3f3a93840d (patch)
tree7f5512b9f54d36d39c8e30b23ca21a7f480b41a9
parent3f0bfbeb22578f6d2ee699100fd185132fbf1c88 (diff)
downloadexchange-295be9df8e96d55df0d58940dcfeee3f3a93840d.tar.gz
exchange-295be9df8e96d55df0d58940dcfeee3f3a93840d.tar.bz2
exchange-295be9df8e96d55df0d58940dcfeee3f3a93840d.zip
fix #8452
-rw-r--r--src/exchange/taler-exchange-aggregator.c12
-rw-r--r--src/exchange/taler-exchange-httpd_deposits_get.c8
2 files changed, 19 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 1d0a0bb5d..fa7b02b08 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -906,18 +906,28 @@ run_aggregation (void *cls)
(0 == counter) )
{
/* in test mode, shutdown after a shard is done with 0 work */
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "No work done and in test mode, shutting down\n");
GNUNET_SCHEDULER_shutdown ();
return;
}
GNUNET_assert (NULL == task);
/* If we ended up doing zero work, sleep a bit */
if (0 == counter)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Going to sleep for %s before trying again\n",
+ GNUNET_TIME_relative2s (aggregator_idle_sleep_interval,
+ true));
task = GNUNET_SCHEDULER_add_delayed (aggregator_idle_sleep_interval,
&drain_kyc_alerts,
NULL);
+ }
else
+ {
task = GNUNET_SCHEDULER_add_now (&drain_kyc_alerts,
NULL);
+ }
return;
}
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
@@ -1032,6 +1042,7 @@ run_shard (void *cls)
GNUNET_free (s);
delay = GNUNET_TIME_randomized_backoff (delay,
GNUNET_TIME_UNIT_SECONDS);
+ GNUNET_assert (NULL == task);
task = GNUNET_SCHEDULER_add_delayed (delay,
&run_shard,
NULL);
@@ -1049,6 +1060,7 @@ run_shard (void *cls)
"Starting shard [%u:%u]!\n",
(unsigned int) s->shard_start,
(unsigned int) s->shard_end);
+ GNUNET_assert (NULL == task);
task = GNUNET_SCHEDULER_add_now (&run_aggregation,
s);
}
diff --git a/src/exchange/taler-exchange-httpd_deposits_get.c b/src/exchange/taler-exchange-httpd_deposits_get.c
index 818900c60..0850d19eb 100644
--- a/src/exchange/taler-exchange-httpd_deposits_get.c
+++ b/src/exchange/taler-exchange-httpd_deposits_get.c
@@ -157,6 +157,7 @@ void
TEH_deposits_get_cleanup ()
{
struct DepositWtidContext *n;
+
for (struct DepositWtidContext *ctx = dwc_head;
NULL != ctx;
ctx = n)
@@ -313,13 +314,15 @@ db_event_cb (void *cls,
(void) extra;
(void) extra_size;
- if (GNUNET_NO != ctx->suspended)
+ if (GNUNET_YES != ctx->suspended)
return; /* might get multiple wake-up events */
GNUNET_CONTAINER_DLL_remove (dwc_head,
dwc_tail,
ctx);
GNUNET_async_scope_enter (&ctx->rc->async_scope_id,
&old_scope);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Resuming request handling\n");
TEH_check_invariants ();
ctx->suspended = GNUNET_NO;
MHD_resume_connection (ctx->rc->connection);
@@ -356,6 +359,7 @@ handle_track_transaction_request (
&rep.header,
&db_event_cb,
ctx);
+ GNUNET_break (NULL != ctx->eh);
}
{
MHD_RESULT mhd_ret;
@@ -379,6 +383,8 @@ handle_track_transaction_request (
if ( (GNUNET_TIME_absolute_is_future (ctx->timeout)) &&
(GNUNET_NO == ctx->suspended) )
{
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Suspending request handling\n");
GNUNET_CONTAINER_DLL_insert (dwc_head,
dwc_tail,
ctx);