BIND 10 #2432: define and implement base and libdns++ version of RRsetCollection
BIND 10 Development
do-not-reply at isc.org
Thu Jan 3 02:40:15 UTC 2013
#2432: define and implement base and libdns++ version of RRsetCollection
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner: muks
Type: task | Status:
Priority: medium | reviewing
Component: libdns++ | Milestone:
Keywords: | Sprint-20130108
Sensitive: 0 | Resolution:
Sub-Project: DNS | CVSS Scoring:
Estimated Difficulty: 5 | Defect Severity: N/A
Total Hours: 0 | Feature Depending on Ticket:
| loadzone-ng
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by jinmei):
Hmm...and another critical point (not for the branch itself, but the
design/description)...I'm not sure why I described it that way in the
wiki page
(http://bind10.isc.org/wiki/ZoneLoadingAPIDesign#a2.2ClassesFunctionsforValidating),
but I don't think it feasible to return `AbstractRRset*` from
`RRsetCollectionBase::find()` because the ownership management will be
quite tricky. In fact, the sample code for the datasrc case looks
buggy:
{{{#!cpp
class RRsetCollection : public RRsetCollectionBase {
public:
RRsetCollection(ZoneUpdater& updater);
virtual const AbstractRRset* find(const Name& name, RRType type) const
{
return (updater.getFinder().find(name, type,
NO_WILDCARD|FIND_GLUE_OK).get());
}
};
}}}
because it's not guaranteed that the pointer stored in the result of
`ZoneFinder::find()` is valid after returning from
`RRsetCollection::find()`.
I believe we should change the type of the return value to
`ConstRRsetPtr`.
--
Ticket URL: <http://bind10.isc.org/ticket/2432#comment:26>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list