[bind10-dev] iterator type zone loader

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Tue May 8 03:46:53 UTC 2012


At Mon, 30 Apr 2012 09:28:04 +0200,
Michal 'vorner' Vaner <michal.vaner at nic.cz> wrote:

> Yes, something like this. I'd still argue that returning a single RR instead of
> accumulating the whole RRset is better (so if someone incorrectly relies on the
> loader collating all the RRs of the same RRset together, it breaks sooner than
> later), but that's a different detail.

Regarding this point, I just come up with a possible reason why the
BIND 9 loader accumulates RRs of the same RRset as much as possible
before passing it to the underlying DB implementation.  Its in-memory
DB implementation internally stores all RDATAs in a contiguous memory
region.  So if the loader passed the RRs separately, it would need to
repeat allocating a larger region for the extended set of RDATAs,
copying old data to the new region, and deallocating the old region.
If it's given an RRset, it's possible to calculate the necessary size
for the region to store all RDATAs of the set, so it only has to do it
once at least for that set.  And, it would often be the case this
RRset is complete, which is especially so if the zone file is
preprocessed by some DNSSEC signing tool or was created by named
itself as a result of incoming zone transfer.

It's just my guess, but it seems to make sense, and we probably want
to make it possible, even if we also provide a separate-RR mode.

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.


More information about the bind10-dev mailing list