BIND 10 trac2157_2, updated. 5d31621e52c2f2be062284f71a589218ab9a4d0a [2157] added a note for the case statistics counters are not incremented

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Jan 29 11:12:29 UTC 2013


The branch, trac2157_2 has been updated
       via  5d31621e52c2f2be062284f71a589218ab9a4d0a (commit)
       via  819407f4b51521da995e893f022c06853a6f40cd (commit)
       via  f91f95678f03873d47480a9589dae1936423cff7 (commit)
      from  3476033eb79b246bbf0904085f4cab3805d5eddd (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 5d31621e52c2f2be062284f71a589218ab9a4d0a
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Tue Jan 29 19:59:50 2013 +0900

    [2157] added a note for the case statistics counters are not incremented

commit 819407f4b51521da995e893f022c06853a6f40cd
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Tue Jan 29 18:56:30 2013 +0900

    [2157] update doxygen comments

commit f91f95678f03873d47480a9589dae1936423cff7
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Tue Jan 29 14:49:55 2013 +0900

    [2157] statistics counter check in lettuce corrected
    
    it didn't work if only 'counter' parameter is given

-----------------------------------------------------------------------

Summary of changes:
 src/bin/auth/b10-auth.xml.pre                    |   15 ++++++++
 src/lib/statistics/counter.h                     |    5 ++-
 src/lib/statistics/counter_dict.h                |   43 ++++++++++++++++++++--
 tests/lettuce/features/terrain/bind10_control.py |    3 +-
 4 files changed, 59 insertions(+), 7 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/b10-auth.xml.pre b/src/bin/auth/b10-auth.xml.pre
index 45fb684..0ecc49c 100644
--- a/src/bin/auth/b10-auth.xml.pre
+++ b/src/bin/auth/b10-auth.xml.pre
@@ -196,6 +196,21 @@
 
 <!-- ### STATISTICS DATA PLACEHOLDER ### -->
 
+    <note><para>
+      DNS parameters (e.g. opcode) in the request message will not be
+      considered if <command>b10-auth</command> failed to parse message,
+      including but not limited to the following circumstance:
+      <itemizedlist>
+        <listitem><para>
+          EDNS version of a message is unknown to
+          <command>b10-auth</command>.
+        </para></listitem>
+        <listitem><para>
+          TSIG signature verification fails.
+        </para></listitem>
+      </itemizedlist>
+    </para></note>
+
   </refsect1>
 
   <refsect1>
diff --git a/src/lib/statistics/counter.h b/src/lib/statistics/counter.h
index 186b294..27bfac4 100644
--- a/src/lib/statistics/counter.h
+++ b/src/lib/statistics/counter.h
@@ -37,8 +37,9 @@ private:
 public:
     /// The constructor.
     ///
-    /// This constructor is mostly exception free. But it may still throw
-    /// a standard exception if memory allocation fails inside the method.
+    /// This constructor prepares a set of counters which has \a items
+    /// elements. The counters will be initialized with \a InitialValue;
+    /// which is defined as 0.
     ///
     /// \param items A number of counter items to hold (greater than 0)
     ///
diff --git a/src/lib/statistics/counter_dict.h b/src/lib/statistics/counter_dict.h
index 6fb74ce..08a8b37 100644
--- a/src/lib/statistics/counter_dict.h
+++ b/src/lib/statistics/counter_dict.h
@@ -46,6 +46,16 @@ private:
     // specified at the construction of this class.
     CounterDictionary();
 public:
+    /// The constructor.
+    ///
+    /// This constructor prepares a dictionary of set of counters.
+    /// Initially the dictionary is empty.
+    /// Each counter has \a items elements. The counters will be initialized
+    /// with \a InitialValue; which is defined as 0.
+    ///
+    /// \param items A number of counter items to hold (greater than 0)
+    ///
+    /// \throw isc::InvalidParameter \a items is 0
     explicit CounterDictionary(const size_t items) :
         items_(items)
     {
@@ -54,6 +64,13 @@ public:
             isc_throw(isc::InvalidParameter, "Items must not be 0");
         }
     }
+
+    /// \brief Add an element which has a key \a name to the dictionary.
+    ///
+    /// \param name A key of the element to add
+    ///
+    /// \throw isc::InvalidParameter an element which has \a name as key
+    ///                              already exists
     void addElement(const std::string& name) {
         // throw if the element already exists
         if (dictionary_.count(name) != 0) {
@@ -65,6 +82,13 @@ public:
         dictionary_.insert(
             DictionaryMap::value_type(name, CounterPtr(new Counter(items_))));
     }
+
+    /// \brief Delete the element which has a key \a name from the dictionary.
+    ///
+    /// \param name A key of the element to delete
+    ///
+    /// \throw isc::OutOfRange an element which has \a name as key does not
+    ///                        exist
     void deleteElement(const std::string& name) {
         const size_t result = dictionary_.erase(name);
         if (result != 1) {
@@ -74,6 +98,13 @@ public:
                       "Element " << name << " does not exist");
         }
     }
+
+    /// \brief Get a reference to a %Counter which has \a name as key
+    ///
+    /// \param name A key of the element
+    ///
+    /// \throw isc::OutOfRange an element which has \a name as key does not
+    ///                        exist
     Counter& getElement(const std::string& name) {
         DictionaryMap::const_iterator i = dictionary_.find(name);
         if (i != dictionary_.end()) {
@@ -86,9 +117,12 @@ public:
                       "Element " << name << " does not exist");
         }
     }
+
+    /// \brief Same as \c getElement()
     Counter& operator[](const std::string& name) {
         return (getElement(name));
     }
+
     /// \brief \c ConstIterator is a constant iterator that provides an
     /// interface for enumerating name of zones stored in CounterDictionary.
     ///
@@ -117,18 +151,18 @@ public:
             {}
 
         private:
-            /// \brief An internal method to increment this iterator.
+            // An internal method to increment this iterator.
             void increment() {
                 ++iterator_;
                 return;
             }
 
-            /// \brief An internal method to check equality.
+            // An internal method to check equality.
             bool equal(const ConstIterator& other) const {
                 return (iterator_ == other.iterator_);
             }
 
-            /// \brief An internal method to dereference this iterator.
+            // An internal method to dereference this iterator.
             const value_type& dereference() const {
                 return (iterator_->first);
             }
@@ -138,9 +172,12 @@ public:
             DictionaryMap::const_iterator iterator_;
     };
 
+    /// \brief Get an iterator for the beginning of the dictionary.
     ConstIterator begin() const {
         return (CounterDictionary::ConstIterator(dictionary_.begin()));
     }
+
+    /// \brief Get an iterator for the end of the dictionary.
     ConstIterator end() const {
         return (CounterDictionary::ConstIterator(dictionary_.end()));
     }
diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py
index 7e71abb..afa76d9 100644
--- a/tests/lettuce/features/terrain/bind10_control.py
+++ b/tests/lettuce/features/terrain/bind10_control.py
@@ -422,8 +422,7 @@ def check_statistics(step, counter, category, zone, gtltbt, number, upper):
         zone_str = " for zone %s" % zone
     for level in depth:
         output = find_value(output, level)
-    else:
-        found = find_value(output, counter)
+    found = find_value(output, counter)
     assert found is not None, \
         'Not found statistics counter %s%s%s' % \
             (counter, category_str, zone_str)



More information about the bind10-changes mailing list