BIND 10 #2811: Make some DomainTree code updates
BIND 10 Development
do-not-reply at isc.org
Fri Aug 2 12:21:06 UTC 2013
#2811: Make some DomainTree code updates
-------------------------------------+-------------------------------------
Reporter: muks | Owner:
Type: enhancement | vorner
Priority: medium | Status:
Component: data source | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130806
Sub-Project: DNS | Resolution:
Estimated Difficulty: 3 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by muks):
* owner: muks => vorner
Comment:
Replying to [comment:15 vorner]:
> The big loop in the `insertRebalance`, the one starting with:
> {{{#!c++
> // The node enters this method colored RED. We assume in our
> // red-black implementation that NULL values in left and right
> // children are BLACK.
> //
> // Case 1. If node is at the subtree root, we don't need to change
> // its position in the tree. We re-color it BLACK further below
> // (right before we return).
> while (node != (*subtree_root).get()) {
> // Case 2. If the node is not subtree root, but its parent is
> // colored BLACK, then we're done. This is because the new node
> // introduces a RED node in the path through it (from its
> // subtree root to its children colored BLACK) but doesn't
> // change the red-black properties.
> }}}
>
> In the case 4, it rotates the tree. I had the impression that once we
rotate, the whole update rebalancing ends.
Yes. In this case, we go back to the start of the loop, case 1 is `true`
and then case 2 breaks out of the `while` loop.
--
Ticket URL: <http://bind10.isc.org/ticket/2811#comment:16>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list