BIND 10 #2208: Revise InMemoryClient and ConfigurableClientList::configure() using ZoneTableSegment
BIND 10 Development
do-not-reply at isc.org
Tue Sep 4 06:31:45 UTC 2012
#2208: Revise InMemoryClient and ConfigurableClientList::configure() using
ZoneTableSegment
-------------------------------------+-------------------------------------
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: 5
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
background zone loading |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Description changed by jinmei:
Old description:
> 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_.
New description:
(We probably don't have time to do this for the September release)
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#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list