gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: -improve queue handling


From: gnunet
Subject: [gnunet] branch master updated: -improve queue handling
Date: Tue, 25 Oct 2022 16:43:15 +0200

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 34dd11925 -improve queue handling
34dd11925 is described below

commit 34dd119251f9806a4f83de4d405e654dc6b1bf76
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Oct 25 23:43:09 2022 +0900

    -improve queue handling
---
 src/zonemaster/gnunet-service-zonemaster.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/zonemaster/gnunet-service-zonemaster.c 
b/src/zonemaster/gnunet-service-zonemaster.c
index 27a8d0dd3..b0e8dc29c 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -201,6 +201,11 @@ struct DhtPutActivity
    * When was this PUT initiated?
    */
   struct GNUNET_TIME_Absolute start_date;
+
+  /**
+   * Zone monitor
+   */
+  struct GNUNET_NAMESTORE_ZoneMonitor *zm;
 };
 
 /**
@@ -767,6 +772,14 @@ dht_put_continuation (void *cls)
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "PUT complete\n");
+  /* When we just fall under the limit, trigger monitor or iterator again */
+  if (dht_queue_length == DHT_QUEUE_LIMIT)
+  {
+    if (NULL != ma->zm)
+      GNUNET_NAMESTORE_zone_monitor_next (ma->zm, 1);
+    else
+      GNUNET_NAMESTORE_zone_iterator_next (namestore_iter, 1);
+  }
   dht_queue_length--;
   GNUNET_CONTAINER_DLL_remove (it_head,
                                it_tail,
@@ -1052,7 +1065,6 @@ put_gns_record (void *cls,
   put_cnt++;
   if (0 == put_cnt % DELTA_INTERVAL)
     update_velocity (DELTA_INTERVAL);
-  check_zone_namestore_next ();
   if (dht_queue_length >= DHT_QUEUE_LIMIT)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -1060,6 +1072,7 @@ put_gns_record (void *cls,
                 DHT_QUEUE_LIMIT);
     return;
   }
+  check_zone_namestore_next ();
 
   ma = GNUNET_new (struct DhtPutActivity);
   perform_dht_put (key,
@@ -1231,6 +1244,7 @@ handle_monitor_event (void *cls,
     return;
   }
   ma = GNUNET_new (struct DhtPutActivity);
+  ma->zm = zmon;
   perform_dht_put_monitor (zone,
                            label,
                            rd,

-- 
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]