BIND 10 #2541: add addZone() interface for data source

BIND 10 Development do-not-reply at isc.org
Mon Dec 10 20:24:11 UTC 2012


#2541: add addZone() interface for data source
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |  UnAssigned
            Priority:  medium        |                       Status:
           Component:  data source   |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20121218
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  0             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |  loadzone-ng
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => UnAssigned
 * status:  assigned => reviewing


Comment:

 I ran into a few snags and last-minute design decisions, some of which may
 be controversial, so if whoever would pick this up for review has any
 problems with the following, you are allowed to let me know first before
 you review the rest :)

 - addZone was already a method in MemoryClient (with a different
 footprint), and rather than changing the existing one I opted for naming
 the top-level call 'createZone()'. but we could move the existing one and
 call the new one addZone of course.
 - Instead of a pure virtual, I made createZone() have a default
 implementation that throws NotImplemented
 - The specific implementation for SQLite3Client does not hold a
 transaction, and does not do duplicate checks, like addRecordToZone i kept
 it as dumb as possible. (what id it returns in such a scenario is kind of
 undefined)
 - It is DatabaseClient that uses startTransaction and commit() to keep the
 transaction between the lookup and the creation (Added a RAII-style holder
 class for that (i guess we could update the DatabaseUpdater class to use
 this one as well and not have it duplicate code)).

 (and now that it works like that, at least at the moment, it is really not
 necessary for SQLite3Accessor::addZone() to return anything at all, its
 return value is ignored anyway. However, if we keep it in it is probably
 easier to make an addZone that directly creates an updater, or have the
 updater create the zone, should that discussion be picked up again).

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


More information about the bind10-tickets mailing list