View Issue Details

IDProjectCategoryView StatusLast Update
0002807GNUnetutil librarypublic2013-03-13 22:54
ReporterFlorian Dold Assigned ToChristian Grothoff Due Date
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 02: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 ModifiedUsernameFieldChange
2013-02-25 15:16Florian DoldNew Issue
2013-03-04 02:50Christian GrothoffNote Added: 0006910
2013-03-04 02:50Christian GrothoffAssigned To => Christian Grothoff
2013-03-04 02:50Christian GrothoffStatusnew => feedback
2013-03-04 02:50Christian GrothoffAssigned ToChristian Grothoff => Florian Dold
2013-03-04 02:50Christian GrothoffStatusfeedback => assigned
2013-03-13 22:54Christian GrothoffAssigned ToFlorian Dold => Christian Grothoff
2013-03-13 22:54Christian GrothoffSeverityminor => feature
2013-03-13 22:54Christian GrothoffStatusassigned => closed
2013-03-13 22:54Christian GrothoffResolutionopen => won't fix
2013-03-13 22:54Christian GrothoffFixed in Version => Git master
2013-03-13 22:54Christian GrothoffTarget Version => Git master