News for hackers. Stuff that matters.
Re:Finally Redis collections are iterable by qwerta on Tuesday October 29, 2013 @10:40AM (#6634431)
Is 64bit counter part of hash which points to current position in Hash Tree?

I implemented something similar for HTreeMap, but in Java.

Re:Finally Redis collections are iterable by antirez on Tuesday October 29, 2013 @10:46AM (#6634481)
It's actually something like a counter that counts starting from the most significant bits first, in the article there is a link to a comment that explains the implementation.
Re:Finally Redis collections are iterable by qwerta on Tuesday October 29, 2013 @11:04AM (#6634628)
So it was hard because hash table could resize between calls?

For HTreeMap I used expanding Hash Tree. There are 4 dir levels, each with 128 entries. If dir becomes full (or has too many collisions), it splits into another 128 dirs.

Iterations is done by increasing counter. If dir at level 2 is not found, it is increased by 128^2. Writing iterators took single day.