BIND 10 trac2435_2, updated. 12807b1d6e3a0846198bcc062978c077ac101b91 [2435] Make minor documentation updates
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jan 28 03:59:26 UTC 2013
The branch, trac2435_2 has been updated
via 12807b1d6e3a0846198bcc062978c077ac101b91 (commit)
via b22bc32b2776aa8904ee4fae2e9f6b075eace0f4 (commit)
via df5cb12f60fc4f22b24218a54bf428f403cabe22 (commit)
from 72383e89593fdc91a83b0ffe875a4fdb5114fbfc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 12807b1d6e3a0846198bcc062978c077ac101b91
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Jan 28 09:28:26 2013 +0530
[2435] Make minor documentation updates
commit b22bc32b2776aa8904ee4fae2e9f6b075eace0f4
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Jan 28 09:22:48 2013 +0530
[2435] Make documentation updates
commit df5cb12f60fc4f22b24218a54bf428f403cabe22
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Jan 28 09:21:41 2013 +0530
[2435] Make ZoneUpdater return a isc::dns::RRsetCollectionBase reference
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/database.cc | 2 +-
src/lib/datasrc/rrset_collection_base.h | 3 --
src/lib/datasrc/tests/database_unittest.cc | 4 +-
.../datasrc/tests/master_loader_callbacks_test.cc | 2 +-
src/lib/datasrc/tests/zone_loader_unittest.cc | 19 +++----
src/lib/datasrc/zone.h | 7 +--
src/lib/datasrc/zone_loader.cc | 3 +-
src/lib/dns/rrset_collection_base.h | 52 +++++++++++---------
8 files changed, 43 insertions(+), 49 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc
index 195793a..b34b427 100644
--- a/src/lib/datasrc/database.cc
+++ b/src/lib/datasrc/database.cc
@@ -1439,7 +1439,7 @@ public:
virtual ZoneFinder& getFinder() { return (*finder_); }
- virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() {
+ virtual isc::dns::RRsetCollectionBase& getRRsetCollection() {
if (!rrset_collection_) {
// This is only assigned the first time and remains for the
// lifetime of the DatabaseUpdater.
diff --git a/src/lib/datasrc/rrset_collection_base.h b/src/lib/datasrc/rrset_collection_base.h
index 39baa8e..66b5825 100644
--- a/src/lib/datasrc/rrset_collection_base.h
+++ b/src/lib/datasrc/rrset_collection_base.h
@@ -22,9 +22,6 @@
namespace isc {
namespace datasrc {
-/// \brief A forward declaration
-class ZoneUpdater;
-
/// \brief datasrc derivation of \c isc::dns::RRsetCollectionBase.
///
/// This is a default datasrc implementation of
diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc
index a0fc6bf..ccc4104 100644
--- a/src/lib/datasrc/tests/database_unittest.cc
+++ b/src/lib/datasrc/tests/database_unittest.cc
@@ -4244,7 +4244,7 @@ public:
{}
ZoneUpdaterPtr updater;
- isc::datasrc::RRsetCollectionBase& collection;
+ isc::dns::RRsetCollectionBase& collection;
};
TYPED_TEST(RRsetCollectionTest, find) {
@@ -4429,7 +4429,7 @@ TYPED_TEST(RRsetCollectionAndUpdaterTest, updateThrows) {
// Test that using an RRsetCollection after calling commit() on the
// ZoneUpdater throws, as the RRsetCollection is disabled.
TYPED_TEST(RRsetCollectionAndUpdaterTest, useAfterCommitThrows) {
- isc::datasrc::RRsetCollectionBase& collection =
+ isc::dns::RRsetCollectionBase& collection =
this->updater_->getRRsetCollection();
// find() must not throw here.
diff --git a/src/lib/datasrc/tests/master_loader_callbacks_test.cc b/src/lib/datasrc/tests/master_loader_callbacks_test.cc
index dc44461..fb4487a 100644
--- a/src/lib/datasrc/tests/master_loader_callbacks_test.cc
+++ b/src/lib/datasrc/tests/master_loader_callbacks_test.cc
@@ -65,7 +65,7 @@ public:
virtual ZoneFinder& getFinder() {
isc_throw(isc::NotImplemented, "Not to be called in this test");
}
- virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() {
+ virtual isc::dns::RRsetCollectionBase& getRRsetCollection() {
isc_throw(isc::NotImplemented, "Not to be called in this test");
}
virtual void deleteRRset(const isc::dns::AbstractRRset&) {
diff --git a/src/lib/datasrc/tests/zone_loader_unittest.cc b/src/lib/datasrc/tests/zone_loader_unittest.cc
index f0ad814..edc01a8 100644
--- a/src/lib/datasrc/tests/zone_loader_unittest.cc
+++ b/src/lib/datasrc/tests/zone_loader_unittest.cc
@@ -14,6 +14,7 @@
#include <datasrc/zone_loader.h>
#include <datasrc/data_source.h>
+#include <datasrc/rrset_collection_base.h>
#include <datasrc/memory/zone_table_segment.h>
#include <datasrc/memory/memory_client.h>
@@ -77,24 +78,16 @@ public:
RRClass rrclass_;
};
-// Test implementation of RRsetCollectionBase.
+// Test implementation of RRsetCollectionBase. This is currently just a
+// wrapper around \c isc::datasrc::RRsetCollectionBase;
+// \c isc::datasrc::RRsetCollectionBase may become an abstract class in
+// the future.
class TestRRsetCollection : public isc::datasrc::RRsetCollectionBase {
public:
TestRRsetCollection(ZoneUpdater& updater,
const isc::dns::RRClass& rrclass) :
isc::datasrc::RRsetCollectionBase(updater, rrclass)
{}
-
- virtual ~TestRRsetCollection() {}
-
-protected:
- virtual RRsetCollectionBase::IterPtr getBeginning() {
- isc_throw(isc::NotImplemented, "This method is not implemented.");
- }
-
- virtual RRsetCollectionBase::IterPtr getEnd() {
- isc_throw(isc::NotImplemented, "This method is not implemented.");
- }
};
// The updater isn't really correct according to the API. For example,
@@ -111,7 +104,7 @@ public:
virtual ZoneFinder& getFinder() {
return (finder_);
}
- virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() {
+ virtual isc::dns::RRsetCollectionBase& getRRsetCollection() {
if (!rrset_collection_) {
rrset_collection_.reset(new TestRRsetCollection(*this,
client_->rrclass_));
diff --git a/src/lib/datasrc/zone.h b/src/lib/datasrc/zone.h
index 86f6e3b..c4b7a29 100644
--- a/src/lib/datasrc/zone.h
+++ b/src/lib/datasrc/zone.h
@@ -21,7 +21,7 @@
#include <datasrc/exceptions.h>
#include <datasrc/result.h>
-#include <datasrc/rrset_collection_base.h>
+#include <dns/rrset_collection_base.h>
#include <utility>
#include <vector>
@@ -741,9 +741,6 @@ typedef boost::shared_ptr<ZoneFinder::Context> ZoneFinderContextPtr;
/// \c ZoneFinder::Context object.
typedef boost::shared_ptr<ZoneFinder::Context> ConstZoneFinderContextPtr;
-/// \brief A forward declaration
-class RRsetCollectionBase;
-
/// The base class to make updates to a single zone.
///
/// On construction, each derived class object will start a "transaction"
@@ -863,7 +860,7 @@ public:
/// If an \c RRsetCollection is disabled, using methods such as \c find()
/// and using its iterator would cause an exception to be thrown. See
/// \c isc::datasrc::RRsetCollectionBase for details.
- virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() = 0;
+ virtual isc::dns::RRsetCollectionBase& getRRsetCollection() = 0;
/// Add an RRset to a zone via the updater
///
diff --git a/src/lib/datasrc/zone_loader.cc b/src/lib/datasrc/zone_loader.cc
index 098b47a..e8c773f 100644
--- a/src/lib/datasrc/zone_loader.cc
+++ b/src/lib/datasrc/zone_loader.cc
@@ -20,12 +20,12 @@
#include <datasrc/iterator.h>
#include <datasrc/zone.h>
#include <datasrc/logger.h>
-#include <datasrc/rrset_collection_base.h>
#include <dns/rrset.h>
#include <dns/zone_checker.h>
#include <dns/name.h>
#include <dns/rrclass.h>
+#include <dns/rrset_collection_base.h>
#include <boost/bind.hpp>
@@ -33,6 +33,7 @@
using isc::dns::Name;
using isc::dns::ConstRRsetPtr;
+using isc::dns::RRsetCollectionBase;
using isc::dns::MasterLoader;
namespace isc {
diff --git a/src/lib/dns/rrset_collection_base.h b/src/lib/dns/rrset_collection_base.h
index 64f6379..5785eb0 100644
--- a/src/lib/dns/rrset_collection_base.h
+++ b/src/lib/dns/rrset_collection_base.h
@@ -58,31 +58,37 @@ public:
/// is found, \c NULL is returned.
///
/// This method's implementations currently are not specified to
- /// handle \c RRTypes such as RRSIG and NSEC3. It's not clear
- /// whether we want to return all RRSIGs of the given name covering
- /// any RR types (in which case, we need to figure out how), or we
- /// need to extend the interface so we can specify the covered
- /// type. The libdns++ implementation (\c isc::dns::RRsetCollection)
- /// could actually match RRSIG RRsets because its \c addRRset()
- /// method does not reject the direct addition of RRSIGs. There are
- /// such fundamental open questions, and a specific derived
- /// implementation may return something if type RRSIG is specified,
- /// but this is not specified here at the base class level, i.e.,
- /// for RRSIGs the behavior is undefined. This interface may be
- /// refined to clarify this point in the future, and perhaps,
- /// provide additional API for this RRType.
+ /// handle \c RRTypes such as RRSIG and NSEC3. This interface may be
+ /// refined to clarify this point in the future, and perhaps, provide
+ /// additional API for these RRType.
///
- /// Behavior with non-concrete types such as ANY and AXFR are also
+ /// As for RRSIG, there are some fundamental open questions. For
+ /// example, it's not clear whether we want to return all RRSIGs of
+ /// the given name covering any RR types (in which case, we need to
+ /// figure out how), or we need to extend the interface so we can
+ /// specify the covered type. A specific derived implementation may
+ /// return something if type RRSIG is specified, but this is not
+ /// specified here at the base class level. So, for RRSIGs the
+ /// behavior should be assumed as undefined.
+ ///
+ /// As for NSEC3, it's not clear whether owner names (which included
+ /// hashed labels) are the best choice of search key, because in many
+ /// cases, what the application wants to find is an NSEC3 that has the
+ /// hash of some particular "normal" domain names. Also, if the underlying
+ /// implementation encapsulates a single zone, NSEC3 records conceptually
+ /// belong to a separate name space, which may cause implementation
+ /// difficulty.
+ ///
+ /// Behavior with meta types such as ANY and AXFR are also
/// undefined. A specific implementation may return something for
- /// these (a \c RRType::AXFR() RRset can be created and passed to
- /// \c isc::dns::RRsetCollection, for example). But, unlike the case
- /// of RRSIGs, these types of RRsets are not expected to be added to
- /// any implementation of collection in the first place (by the
- /// definition of "meta types"), so querying for such types is
- /// basically an invalid operation. The API doesn't require
- /// implementations to check this condition and reject it, so the
- /// behavior is undefined. This interface will not be refined in
- /// future versions for these meta types.
+ /// these. But, unlike the case of RRSIGs, these types of RRsets
+ /// are not expected to be added to any implementation of
+ /// collection in the first place (by the definition of "meta
+ /// types"), so querying for such types is basically an invalid
+ /// operation. The API doesn't require implementations to check
+ /// this condition and reject it, so the behavior is
+ /// undefined. This interface will not be refined in future
+ /// versions for these meta types.
///
/// \throw RRsetCollectionError if find() results in some
/// implementation-specific error.
More information about the bind10-changes
mailing list