gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: RPS sampler: An id might be


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: RPS sampler: An id might be removed while a request is still pending
Date: Mon, 25 Feb 2019 20:37:56 +0100

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

julius-buenger pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new adbb529b7 RPS sampler: An id might be removed while a request is still 
pending
adbb529b7 is described below

commit adbb529b74ba2cc63880c11522c09b50fef34823
Author: Julius Bünger <address@hidden>
AuthorDate: Mon Feb 25 20:36:44 2019 +0100

    RPS sampler: An id might be removed while a request is still pending
---
 src/rps/gnunet-service-rps.c         | 7 ++++++-
 src/rps/gnunet-service-rps_sampler.h | 6 ++++++
 src/rps/rps-sampler_common.c         | 6 ++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index a185645ef..098c71f93 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2389,6 +2389,12 @@ hist_update (const struct GNUNET_PeerIdentity *ids,
   for (i = 0; i < num_peers; i++)
   {
     int inserted;
+    if (GNUNET_YES != check_peer_known (sub->peer_map, &ids[i]))
+    {
+      LOG (GNUNET_ERROR_TYPE_WARNING,
+           "Peer in history update not known!\n");
+      continue;
+    }
     inserted = insert_in_view (sub, &ids[i]);
     if (GNUNET_OK == inserted)
     {
@@ -4369,7 +4375,6 @@ do_round (void *cls)
     }
   }
   // TODO independent of that also get some peers from CADET_get_peers()?
-  // TODO log/stat expected pushes/difference to received pushes
   if (CustomPeerMap_size (sub->push_map) < HISTOGRAM_FILE_SLOTS)
   {
     sub->push_recv[CustomPeerMap_size (sub->push_map)]++;
diff --git a/src/rps/gnunet-service-rps_sampler.h 
b/src/rps/gnunet-service-rps_sampler.h
index 9f60aa7c9..921570f7d 100644
--- a/src/rps/gnunet-service-rps_sampler.h
+++ b/src/rps/gnunet-service-rps_sampler.h
@@ -90,6 +90,12 @@ RPS_sampler_update (struct RPS_Sampler *sampler,
  *
  * Used to get rid of a PeerID.
  *
+ * FIXME: This should also consider currently pending requests
+ *        (Pending requests already collect peerids. As long as not all
+ *        requested IDs have been collected, they are kept.
+ *        Ideally, the @p id should be removed from all pending requests. This
+ *        seems quite complicated.)
+ *
  * @param sampler the sampler to reinitialise a sampler in.
  * @param id the id of the samplers to update.
  */
diff --git a/src/rps/rps-sampler_common.c b/src/rps/rps-sampler_common.c
index e34cdd67b..2b0569c61 100644
--- a/src/rps/rps-sampler_common.c
+++ b/src/rps/rps-sampler_common.c
@@ -215,6 +215,12 @@ RPS_sampler_update (struct RPS_Sampler *sampler,
  *
  * Used to get rid of a PeerID.
  *
+ * FIXME: This should also consider currently pending requests
+ *        (Pending requests already collect peerids. As long as not all
+ *        requested IDs have been collected, they are kept.
+ *        Ideally, the @p id should be removed from all pending requests. This
+ *        seems quite complicated.)
+ *
  * @param sampler the sampler to reinitialise a sampler element in.
  * @param id the id of the sampler elements to update.
  */

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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