BIND 10 #2833: refactor relationship between datasrc::ClientList and ZoneTableSegment
BIND 10 Development
do-not-reply at isc.org
Tue Apr 2 04:22:46 UTC 2013
#2833: refactor relationship between datasrc::ClientList and ZoneTableSegment
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: task | jinmei
Priority: medium | Status:
Component: Unclassified | accepted
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130402
Sub-Project: DNS | Resolution:
Estimated Difficulty: 5 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| shared memory data source
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by jinmei):
trac2833 is ready for review.
First note: I previously made the same name of branch in the shared
repo, and subsequently deleted it. I've reused the same branch name,
assuming no one else is actually using, but please be careful about
any possible confusion.
As it took quite longer than I originally expected and the branch is
getting bigger, I've not completed everything shown in the ticket's
description. What this branch is:
- Introduce a separate class named `CacheConfig`, and moved some of
the configuration logic related to cache from
`ConfigurableClientList::configure`. This class should generally
preserve the current behavior, while it tightens validation a bit.
- Update the `ZoneTableSegment::create()` implementation so it takes
the segment type as a parameter and can actually create different
types of segments (but it currently still only supports the "local"
type). The original plan was to pass and use other configurations
to create(), but as I implemented details I concluded it's possible
and better to maintain `CacheConfig` only in
`ConfigurableClientList`. At least for our planned work for shared
memory support, other configuration information won't be needed in
the segment class, and if it can be configuration free, the class
can be simpler and have lesser dependency.
I chose to skip features related to "load action" and defer it to
#2834.
Other changes are mostly trivial adjustments due to these two.
The diff in the branch is quite large, but there shouldn't be much
really new.
My suggestion for the review is:
- review the first two commit separately (4d3f1c8 and 201899a). The
second one is for using the mock client in tests for `CacheConfig`,
and despite the size it's just for moving the existing code to a new
file with trivial adjustments.
- commits 905f265..1a11b2d (inclusive) are the main part of this
branch. I suggest first reviewing cache_config.{h,cc} (new files)
and their tests, and the diff to client_list.cc, checking it's
essentially refactoring. I believe other changes should be quite
straightforward. Also, ignore the change to static_datasrc_link.cc
(see the next bullet).
- The last commit (0363b41) is actually irrelevant to the subject of
this task, but I thought it's worth doing at this timing. The
separate loadable module is now simply unnecessary, and I suspect it
will actually cause some troubles as we implement more parts of the
shared memory support. The change has some size (especially because
it removes a couple of files), but should basically be
straightforward.
And, due to the deprecation of the "static" type data source, I think
we need a changelog entry. Proposed text:
{{{
598.? [func]* jinmei
The separate "static" data source is now deprecated as it can be
served in the more generic "MasterFiles" type of data source.
This means existing configuration may not work after an update.
If "config show data_sources/classes/CH[0]" on bindctl contains a
"static" type of data source, you'll need to update it as follows:
> config set data_sources/classes/CH[0]/type MasterFiles
> config set data_sources/classes/CH[0]/params {"BIND": =>
"<the value of current data_sources/classes/CH[0]/params>"}
> config set data_sources/classes/CH[0]/cache-enable true
> config commit
(Same for CH[1], CH[2], IN[0], etc, if applicable, although it
should be very unlikely in practice. Also note: '=>' above
indicates the next line is actually part of the command. Do
not type in this "arrow").
(Part of Trac #2833, git 0363b4187fe3c1a148ad424af39e12846610d2d7)
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/2833#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list