[bind10-dev] rbtree find implementation
feng
hanfeng at cnnic.cn
Sat Dec 25 14:42:15 UTC 2010
When I review the code of MemoryZone find, I think the find function in
rbtree has problem.
In RBTree, we do NOT presume that all the domain names store in one rbtree
belong to the same zone,
so there is no guarantee that root will be the Super domain of all the other
domains.
But when we use it as memoryZone, in most case, root will NOT has left or
right,
It only has down pointer, so the find call for any domain in the zone will
always return PARTIALMATCH
which maybe not be what the user wants
so the problem is that the check for root node if PARTIALMATCH returns
should be put into rbtree or memoryzone ?
If we define rbtree as a general map mapping domain to anything else , the
check should be put into memoryzone.
But if in this way, the find code in MemoryZone will look strange to me.
A more general question is that rbtree should be uses to store the zone data
or used as a general map?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101225/cfec10f9/attachment.html>
More information about the bind10-dev
mailing list