Browse Source

[2435] Add a note that some records may not be found by the datasrc RRsetCollection

Mukund Sivaraman 12 years ago
parent
commit
4889272436

+ 4 - 0
src/lib/datasrc/rrset_collection_base.h

@@ -56,6 +56,10 @@ public:
     /// given \c name, \c rrclass and \c rrtype.  If no matching RRset
     /// given \c name, \c rrclass and \c rrtype.  If no matching RRset
     /// is found, \c NULL is returned.
     /// is found, \c NULL is returned.
     ///
     ///
+    /// Note that not all records added through the updater may
+    /// necessarily be found by this method, such as RRs subject to
+    /// DNAME substitution.
+    ///
     /// \throw isc::dns::RRsetCollectionError if \c find() results in
     /// \throw isc::dns::RRsetCollectionError if \c find() results in
     /// some underlying datasrc error, or if \c disable() was called.
     /// some underlying datasrc error, or if \c disable() was called.
     ///
     ///

+ 3 - 4
src/lib/datasrc/tests/database_unittest.cc

@@ -4234,12 +4234,11 @@ TYPED_TEST(RRsetCollectionTest, find) {
                                   this->qclass_, RRType::AAAA());
                                   this->qclass_, RRType::AAAA());
     EXPECT_FALSE(rrset);
     EXPECT_FALSE(rrset);
 
 
-    // TODO: "below.dname.example.org." with type A does not return the
-    // record (see top of file). It needs to be checked if this is what
-    // we want.
+    // "below.dname.example.org." with type A does not return the record
+    // (see top of file). See \c isc::datasrc::RRsetCollectionBase::find()
+    // documentation for details.
     rrset = this->collection.find(Name("below.dname.example.org"),
     rrset = this->collection.find(Name("below.dname.example.org"),
                                   this->qclass_, RRType::A());
                                   this->qclass_, RRType::A());
-    // Is this correct behavior?
     EXPECT_FALSE(rrset);
     EXPECT_FALSE(rrset);
 
 
     // With the FIND_GLUE_OK option passed to ZoneFinder's find(),
     // With the FIND_GLUE_OK option passed to ZoneFinder's find(),