BIND 10 #2208: Revise InMemoryClient and ConfigurableClientList::configure() using ZoneTableSegment

BIND 10 Development do-not-reply at isc.org
Sat Aug 18 06:37:45 UTC 2012


#2208: Revise InMemoryClient and ConfigurableClientList::configure() using
ZoneTableSegment
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |                       Status:  new
            Priority:  medium        |                    Milestone:  Next-
           Component:  data source   |  Sprint-Proposed
           Sensitive:  0             |                     Keywords:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |  background zone loading
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 A subtask of #2201, depend on #2206.

 In this task, we update the following part of this method:

 {{{#!cpp
                 const shared_ptr<InMemoryClient>
                     cache(new_data_sources.back().cache_);
                 ...
                 for (vector<string>::const_iterator
 it(zones_origins.begin());
                      it != zones_origins.end(); ++it) {
                     ...
                 }
 }}}

 using new concepts introduced in this feature work.  For simplicity,
 we assume the use of `MemorySegmentLocal` within this class for the
 moment, but still use the base class wherever possible.

 First, the revised `InMemoryClient` will have the following private
 members:

 {{{#!cpp
 class InMemoryClient : public DataSourceClient {
     // ...
 private:
     boost::shared_ptr<ZoneTableSegment> table_segment_; // or scoped_ptr
 };
 }}}

 As shown in http://bind10.isc.org/wiki/ScalableZoneLoadDesign#a4
 .UsingSegmentsfromIn-MemoryDataSourceClient
 but for simplicity we don't use `ZoneSegment`s.  For the moment,
 everything will be stored in `ZoneTableSegment`.

 Then, the above code to be revised would look like this:

 {{{#!cpp
     ztable_segment = shared_ptr<ZoneTableSegment>(
         ZoneTableSegment::create(config));
     for (vector<string>::const_iterator it(zones_origins.begin());
          it != zones_origins.end(); ++it) {
         zone_data = ZoneData::create(ztable_segment->getMemorySegment(),
 *it);
         ztable_segment->getHeader()->table->insert(zone_data);
     }

     // ideally we should set it in the InMemory constructor
     const shared_ptr<InMemoryClient>
         cache(new_data_sources.back().cache_);
     cache->setZoneTable(ztable_segment);
 }}}

 Some other parts of `InMemoryClient` will also have to be adjusted due
 to the introduction of table_segment_.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2208>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list