BIND 10 #1804: update the RBTreeNodeChain class to identify the "previous" node (2nd part)

BIND 10 Development do-not-reply at isc.org
Sun Mar 18 08:32:42 UTC 2012


#1804: update the RBTreeNodeChain class to identify the "previous" node (2nd part)
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |                       Status:  new
            Priority:  medium        |                    Milestone:  New
           Component:  data source   |  Tasks
           Sensitive:  0             |                     Keywords:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:  in-
         Total Hours:  0             |  memory NSEC
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 This is the separated part of #1803, that is, implementing
 the following part of RBTreeNodeChain::getPreviousNode():

 1. if last_comparison_.getRelation() is COMMONANCESTOR,
    last_comparison_.getCommonLabels() is 1, last_compared_.getLength() !=
 1,
    (the condition so far means the search stops due to a binary search
    and last_comparison_.getOrder() > 0, then that means find() stopped
    by seeing a node whose name (corresponding to last_compared_) is
    smaller than the qname.  This node may or may not be "the previous
    node".  Identify the real previous node as described in the
    following comment of BIND 9's lib/dns/rbt.c:
 {{{#!c
                                  * If the stop node is less, it is not
                                  * necessarily the predecessor.  If the
 stop
                                  * node has a down pointer, then the real
                                  * predecessor is at the end of a level
 below
                                  * (not necessarily the next level).
                                  * Move down levels until the rightmost
 node
                                  * does not have a down pointer.
 }}}

 It could be done in parallel with #1803, but is probably better to
 start after #1803.

-- 
Ticket URL: <http://bind10.isc.org/ticket/1804>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list