BIND 10 master, updated. 4f714bac4547d0a025afd314c309ca5cb603e212 Merge branch 'master' into trac639
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jun 10 01:41:56 UTC 2011
The branch, master has been updated
via 4f714bac4547d0a025afd314c309ca5cb603e212 (commit)
via 6ff5cf12901e9322c4df72e5484b2ed9cdfe9a4f (commit)
via d4aeefff3273af7249ca459eb7e6bc4d358cecd5 (commit)
via 6997749029cc8d634eba96d8fe8d222cb35ed41a (commit)
via e77d93ac97216b2b67124a605649487a767e8d09 (commit)
via 8c6a400b68d28b6c9b37b186a1313eece27b8222 (commit)
from 1302962baac0113c3a9ff10f1317271ca060a1af (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 4f714bac4547d0a025afd314c309ca5cb603e212
Merge: 6ff5cf12901e9322c4df72e5484b2ed9cdfe9a4f 1302962baac0113c3a9ff10f1317271ca060a1af
Author: zhanglikun <zhanglikun at cnnic.cn>
Date: Fri Jun 10 09:40:48 2011 +0800
Merge branch 'master' into trac639
commit 6ff5cf12901e9322c4df72e5484b2ed9cdfe9a4f
Merge: d4aeefff3273af7249ca459eb7e6bc4d358cecd5 6997749029cc8d634eba96d8fe8d222cb35ed41a
Author: zhanglikun <zhanglikun at cnnic.cn>
Date: Fri Jun 10 09:40:30 2011 +0800
Merge branch 'trac639' of ssh://bind10.isc.org/var/bind10/git/bind10 into trac639
commit d4aeefff3273af7249ca459eb7e6bc4d358cecd5
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Jun 8 11:25:18 2011 -0700
[trac639] minor editorial fixes
commit 6997749029cc8d634eba96d8fe8d222cb35ed41a
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Jun 8 11:25:18 2011 -0700
[trac639] minor editorial fixes
commit e77d93ac97216b2b67124a605649487a767e8d09
Author: zhanglikun <zhanglikun at cnnic.cn>
Date: Wed Jun 8 11:05:08 2011 +0800
Remove empty code in file lib/cache/resolver_cache.cc
commit 8c6a400b68d28b6c9b37b186a1313eece27b8222
Author: zhanglikun <zhanglikun at cnnic.cn>
Date: Tue Jun 7 16:42:01 2011 +0800
Remove empty code in lib/cache and the corresponding suppression rule in src/cppcheck-suppress.lst
-----------------------------------------------------------------------
Summary of changes:
src/cppcheck-suppress.lst | 5 -----
src/lib/cache/TODO | 5 +++--
src/lib/cache/message_cache.cc | 18 ------------------
src/lib/cache/message_cache.h | 16 ++--------------
src/lib/cache/resolver_cache.cc | 10 ----------
src/lib/cache/resolver_cache.h | 20 +++-----------------
src/lib/cache/rrset_cache.cc | 18 ------------------
src/lib/cache/rrset_cache.h | 25 +++----------------------
8 files changed, 11 insertions(+), 106 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/cppcheck-suppress.lst b/src/cppcheck-suppress.lst
index 36b8e4c..a4fea30 100644
--- a/src/cppcheck-suppress.lst
+++ b/src/cppcheck-suppress.lst
@@ -4,11 +4,6 @@ debug
missingInclude
// This is a template, and should be excluded from the check
unreadVariable:src/lib/dns/rdata/template.cc:60
-// These three trigger warnings due to the incomplete implementation. This is
-// our problem, but we need to suppress the warnings for now.
-functionConst:src/lib/cache/resolver_cache.h
-functionConst:src/lib/cache/message_cache.h
-functionConst:src/lib/cache/rrset_cache.h
// Intentional self assignment tests. Suppress warning about them.
selfAssignment:src/lib/dns/tests/name_unittest.cc:293
selfAssignment:src/lib/dns/tests/rdata_unittest.cc:228
diff --git a/src/lib/cache/TODO b/src/lib/cache/TODO
index aa7e3b0..31825e4 100644
--- a/src/lib/cache/TODO
+++ b/src/lib/cache/TODO
@@ -12,7 +12,8 @@
* When the rrset beging updated is an NS rrset, NSAS should be updated
together.
* Share the NXDOMAIN info between different type queries. current implementation
- can only cache for the type that user quired, for example, if user query A
+ can only cache for the type that user queried, for example, if user query A
record of a.example. and the server replied with NXDOMAIN, this should be
cached for all the types queries of a.example.
-
+* Add the interfaces for resizing and serialization (loading and dumping) to
+ cache.
diff --git a/src/lib/cache/message_cache.cc b/src/lib/cache/message_cache.cc
index 0464f87..816ffe3 100644
--- a/src/lib/cache/message_cache.cc
+++ b/src/lib/cache/message_cache.cc
@@ -97,24 +97,6 @@ MessageCache::update(const Message& msg) {
return (message_table_.add(msg_entry, entry_key, true));
}
-#if 0
-void
-MessageCache::dump(const std::string&) {
- //TODO
-}
-
-void
-MessageCache::load(const std::string&) {
- //TODO
-}
-
-bool
-MessageCache::resize(uint32_t) {
- //TODO
- return (true);
-}
-#endif
-
} // namespace cache
} // namespace isc
diff --git a/src/lib/cache/message_cache.h b/src/lib/cache/message_cache.h
index 7455f66..979b814 100644
--- a/src/lib/cache/message_cache.h
+++ b/src/lib/cache/message_cache.h
@@ -30,6 +30,8 @@ namespace cache {
/// The object of MessageCache represents the cache for class-specific
/// messages.
///
+/// \todo The message cache class should provide the interfaces for
+/// loading, dumping and resizing.
class MessageCache {
// Noncopyable
private:
@@ -64,20 +66,6 @@ public:
/// If the message doesn't exist in the cache, it will be added
/// directly.
bool update(const isc::dns::Message& msg);
-
-#if 0
- /// \brief Dump the message cache to specified file.
- /// \todo It should can be dumped to one configured database.
- void dump(const std::string& file_name);
-
- /// \brief Load the cache from one file.
- /// \todo It should can be loaded from one configured database.
- void load(const std::string& file_name);
-
- /// \brief Resize the size of message cache in runtime.
- bool resize(uint32_t size);
-#endif
-
protected:
/// \brief Get the hash key for the message entry in the cache.
/// \param name query name of the message.
diff --git a/src/lib/cache/resolver_cache.cc b/src/lib/cache/resolver_cache.cc
index 261db3c..6602f79 100644
--- a/src/lib/cache/resolver_cache.cc
+++ b/src/lib/cache/resolver_cache.cc
@@ -227,16 +227,6 @@ ResolverCache::update(const isc::dns::ConstRRsetPtr& rrset_ptr) {
}
}
-void
-ResolverCache::dump(const std::string&) {
- //TODO
-}
-
-void
-ResolverCache::load(const std::string&) {
- //TODO
-}
-
ResolverClassCache*
ResolverCache::getClassCache(const isc::dns::RRClass& cache_class) const {
for (int i = 0; i < class_caches_.size(); ++i) {
diff --git a/src/lib/cache/resolver_cache.h b/src/lib/cache/resolver_cache.h
index 49818b5..9ad4388 100644
--- a/src/lib/cache/resolver_cache.h
+++ b/src/lib/cache/resolver_cache.h
@@ -76,6 +76,9 @@ public:
///
/// \note Public interaction with the cache should be through ResolverCache,
/// not directly with this one. (TODO: make this private/hidden/local to the .cc?)
+///
+/// \todo The resolver cache class should provide the interfaces for
+/// loading, dumping and resizing.
class ResolverClassCache {
public:
/// \brief Default Constructor.
@@ -300,23 +303,6 @@ public:
///
bool update(const isc::dns::ConstRRsetPtr& rrset_ptr);
- /// \name Cache Serialization
- //@{
- /// \brief Dump the cache content to one file.
- ///
- /// \param file_name file to write to
- ///
- /// \todo It should can be dumped to one configured database.
- void dump(const std::string& file_name);
-
- /// \brief Load the cache from one file.
- ///
- /// \param file to load from
- ///
- /// \todo It should can be loaded from one configured database.
- void load(const std::string& file_name);
- //@}
-
private:
/// \brief Returns the class-specific subcache
///
diff --git a/src/lib/cache/rrset_cache.cc b/src/lib/cache/rrset_cache.cc
index f538320..da19b6d 100644
--- a/src/lib/cache/rrset_cache.cc
+++ b/src/lib/cache/rrset_cache.cc
@@ -79,24 +79,6 @@ RRsetCache::update(const isc::dns::RRset& rrset, const RRsetTrustLevel& level) {
return (entry_ptr);
}
-#if 0
-void
-RRsetCache::dump(const std::string&) {
- //TODO
-}
-
-void
-RRsetCache::load(const std::string&) {
- //TODO
-}
-
-bool
-RRsetCache::resize(uint32_t) {
- //TODO
- return (true);
-}
-#endif
-
} // namespace cache
} // namespace isc
diff --git a/src/lib/cache/rrset_cache.h b/src/lib/cache/rrset_cache.h
index 0e1b08f..73f9b58 100644
--- a/src/lib/cache/rrset_cache.h
+++ b/src/lib/cache/rrset_cache.h
@@ -30,6 +30,9 @@ class RRsetEntry;
/// \brief RRset Cache
/// The object of RRsetCache represented the cache for class-specific
/// RRsets.
+///
+/// \todo The rrset cache class should provide the interfaces for
+/// loading, dumping and resizing.
class RRsetCache{
///
/// \name Constructors and Destructor
@@ -73,28 +76,6 @@ public:
RRsetEntryPtr update(const isc::dns::RRset& rrset,
const RRsetTrustLevel& level);
-#if 0
- /// \brief Dump the rrset cache to specified file.
- ///
- /// \param file_name The file to write to
- ///
- /// \todo It should can be dumped to one configured database.
- void dump(const std::string& file_name);
-
- /// \brief Load the cache from one file.
- ///
- /// \param file_name The file to read from
- ///
- /// \todo It should can be loaded from one configured database.
- void load(const std::string& file_name);
-
- /// \brief Resize the size of rrset cache in runtime.
- ///
- /// \param The size to resize to
- /// \return true
- bool resize(uint32_t size);
-#endif
-
/// \short Protected memebers, so they can be accessed by tests.
protected:
uint16_t class_; // The class of the rrset cache.
More information about the bind10-changes
mailing list