dragonfly
dragonfly copied to clipboard
fix(zset): Better memory consumption calculation
Fixes #2808
What was the bug?
What was the bug?
To quote from NodeCount()
:
size_t NodeCount() const {
// number of nodes in the tree (usually, order of magnitude smaller than Size()).
return num_nodes_;
}
So we were wrong by "an order of magnitude". Unless I got the implementation wrong, but I think I got it right (we allocate per node, not per item)
@romange ok to merge?
Yes!