gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: fix #8452


From: gnunet
Subject: [taler-exchange] branch master updated: fix #8452
Date: Thu, 29 Feb 2024 00:56:51 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 295be9df fix #8452
295be9df is described below

commit 295be9df8e96d55df0d58940dcfeee3f3a93840d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Feb 29 00:56:48 2024 +0100

    fix #8452
---
 src/exchange/taler-exchange-aggregator.c         | 12 ++++++++++++
 src/exchange/taler-exchange-httpd_deposits_get.c |  8 +++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/exchange/taler-exchange-aggregator.c 
b/src/exchange/taler-exchange-aggregator.c
index 1d0a0bb5..fa7b02b0 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 818900c6..0850d19e 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);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]