BIND 10 #2268: some cleanups for in-memory zone load

BIND 10 Development do-not-reply at isc.org
Tue Sep 18 17:40:41 UTC 2012


#2268: some cleanups for in-memory zone load
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:
  jinmei                             |                Status:  new
                       Type:  task   |             Milestone:  Next-Sprint-
                   Priority:         |  Proposed
  medium                             |            Resolution:
                  Component:  data   |             Sensitive:  0
  source                             |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Description changed by jinmei:

Old description:

> See also #2267.  I suggested the following there:
>
> - separate .cc for the load
> - stop using pimpl
> - introduce a helper class for loader
>
> In addition to these, I propose the following:
>
> - reuse the same `RdataEncoder` throughout the entire load().  If we
>   use a helper class as suggested above, that would be a member of it.
> - sort `RdataSet`s in the order of type code.  maybe it's a premature
>   optimization, but I guess younger code types (A, NS, SOA, etc, in
>   particular A) are looked up more often than minor ones.  Since we
>   use naive linear search, it's generally better to place such types
>   of `RdataSet`s before minor ones.
>
> Maybe a beyond of 'hardening', but I would have at least discussed
> them in review if I had been there, so I'm proposing this ticket for
> the hardening sprint as a kind of delayed review feedback.

New description:

 Here are some points to the new in-memory load() function (and its
 helper methods).  These are things I would have at least discussed
 in review if I had been there, so please consider it a kind of delayed
 review feedback.

 - stop using pimpl.   The in-memory client is now almost private
   itself (not expected to be directly used outside of the data
   source implementation), so the advantages of pimpl wouldn't outweigh
   the overhead and complexity of it.
 - move the load logic to a separate .cc file than memory_client.cc.
   It's pretty complicated, and effectively acts like a zone updater
   class implementation.  so it makes more sense to have it in a
   separate file for better readability, just like we separate the
   finder implementation into a separate file.
 - reuse the same `RdataEncoder` throughout the entire load().  If we
   use a helper class as suggested in #2267, that would be a member of
   it. (If #2267 is resolved without such a helper class, maybe we
   should consider introducing it here).
 - sort `RdataSet`s in the order of type code.  maybe it's a premature
   optimization, but I guess younger code types (A, NS, SOA, etc, in
   particular A) are looked up more often than minor ones.  Since we
   use naive linear search, it's generally better to place such types
   of `RdataSet`s before minor ones.

--

-- 
Ticket URL: <http://bind10.isc.org/ticket/2268#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list