BIND 10 #2018: Use updater's finder in DDNS
BIND 10 Development
do-not-reply at isc.org
Mon Jun 4 12:35:29 UTC 2012
#2018: Use updater's finder in DDNS
-------------------------------------+-------------------------------------
Reporter: jelte | Owner: UnAssigned
Type: | Status: reviewing
defect | Milestone:
Priority: | Sprint-20120612
medium | Resolution:
Component: | Sensitive: 0
Unclassified | 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 |
-------------------------------------+-------------------------------------
Changes (by jelte):
* owner: jelte => UnAssigned
* status: assigned => reviewing
Comment:
OK, ready for review, instead of creating a new zonefinder, it now created
the Diff as a member method as well, then proceeds to use the diff's
updater instead of a finder (ZoneUpdater provides the find interface).
There is, however, a catch; as you may notice in the unit tests, I needed
to explicitely destroy the _session, otherwise some tests would fail with
a database is locked error.
There may be some dangling references around the tests (especially when
they create multiple sessions), but still this surprised me somewhat. I am
kind of thinking that maybe we should refactor this some more, and do
something a little bit more RAII-style in handle(), for instance do
something like
{{{
with self.__get_update_zone(zname):
self.__check_acl()
self.__check_prereqs()
...etc
}}}
And have a small container object that creates the diff and updater and
closes it as soon as scope leaves that part of handle().
However, that change seemed worthy of discussion first, so for now I just
went the simple naive way. If the reviewer thinks this is worthy of
pursuing i can either create (yet) another ticket, or do it here, most of
the changes in this branch would be the same I think.
--
Ticket URL: <http://bind10.isc.org/ticket/2018#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list