[bind10-dev] DomainTree::remove() and node fusion behavior
Mukund Sivaraman
muks at isc.org
Fri Aug 30 07:17:50 UTC 2013
Hi Michal
On Fri, Aug 30, 2013 at 08:58:03AM +0200, Michal 'vorner' Vaner wrote:
> On the other side. Does the documentation promise that we preserve
> pointers through all the operations? Does it say at insert? I don't
> think so (but I did not check). Do we rely on such thing anywhere? It
> seems quite common to have a delete operation on container classes
> that invalidates all the iterators ‒ which are abstracted pointers. So
> I think it would be OK to invalidate the pointers on delete.
Do we rely on such thing anywhere? I remember seeing code in the tree
some months ago and thinking to myself "oh so this is why we rewrote
nodeFission() to preserve the pointer". I don't remember where it was
now. :)
Also nodeFission() originally did the reverse of what it does now with
nodes. It used to make the new node the child node, and keep the old
node as the parent "upper node". It was rewritten to have the opposite
behavior with a specific ticket for it, so it didn't invalidate existing
pointers to nodes.
Mukund
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 2881 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20130830/1eb6366a/attachment.bin>
More information about the bind10-dev
mailing list