View Issue Details

IDProjectCategoryView StatusLast Update
0002807GNUnetutil librarypublic2013-03-13 23:54
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionwon't fix 
Product VersionGit master 
Target VersionGit masterFixed in VersionGit master 
Summary0002807: multihashmap should have a way to iterate over keys
DescriptionIn some applications, it is necessary to iterate over only the keys of a multihashmap, in a way that only returns the key once, even if it has multiple values associated with it.

For example, when inserting values into an invertible bloom filter, iterating over the same key twice would result in poisoned buckets.

I propose a function

int
GNUNET_CONTAINER_multihashmap_iterate_keys (
  const struct GNUNET_CONTAINER_MultiHashMap *map,
  GNUNET_CONTAINER_HashMapKeyIterator key_it,
  void *it_cls)

for this, which iterates over all non-empty buckets.

Does it make sense to implement this?
TagsNo tags attached.

Activities

Christian Grothoff

2013-03-04 03:50

manager   ~0006910

I'm not sure it belongs into util; the implementation there would be rather complex, and end up doing largely the same that you need to do here: create a second hash map to remember which keys you've already seen. Given that this is a special case, I think it should be implemented in consensus instead.

Issue History

Date Modified Username Field Change
2013-02-25 16:16 Florian Dold New Issue
2013-03-04 03:50 Christian Grothoff Note Added: 0006910
2013-03-04 03:50 Christian Grothoff Assigned To => Christian Grothoff
2013-03-04 03:50 Christian Grothoff Status new => feedback
2013-03-04 03:50 Christian Grothoff Assigned To Christian Grothoff => Florian Dold
2013-03-04 03:50 Christian Grothoff Status feedback => assigned
2013-03-13 23:54 Christian Grothoff Assigned To Florian Dold => Christian Grothoff
2013-03-13 23:54 Christian Grothoff Severity minor => feature
2013-03-13 23:54 Christian Grothoff Status assigned => closed
2013-03-13 23:54 Christian Grothoff Resolution open => won't fix
2013-03-13 23:54 Christian Grothoff Fixed in Version => Git master
2013-03-13 23:54 Christian Grothoff Target Version => Git master