diff options
author | Michal 'vorner' Vaner <michal.vaner@nic.cz> | 2011-07-07 11:39:45 +0200 |
---|---|---|
committer | Michal 'vorner' Vaner <michal.vaner@nic.cz> | 2011-07-07 11:39:45 +0200 |
commit | d77fde1d390e921740df739699dc03b48777f81a (patch) | |
tree | ec43aa5b631519e287dcc1a477efcbced878f429 /src/lib/cache | |
parent | [trac741] remove newlines + one typo (diff) | |
download | kea-d77fde1d390e921740df739699dc03b48777f81a.tar.xz kea-d77fde1d390e921740df739699dc03b48777f81a.zip |
[trac741] Address review comments
Diffstat (limited to 'src/lib/cache')
-rw-r--r-- | src/lib/cache/cache_messages.mes | 15 | ||||
-rw-r--r-- | src/lib/cache/rrset_cache.cc | 8 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/cache/cache_messages.mes b/src/lib/cache/cache_messages.mes index 75dcfb5794..513384a507 100644 --- a/src/lib/cache/cache_messages.mes +++ b/src/lib/cache/cache_messages.mes @@ -41,7 +41,7 @@ nothing. Debug message. We found the whole message in the cache, so it can be returned to user without any other lookups. -% CACHE_MESSAGES_INIT initialized message cache for %1 %2 messages +% CACHE_MESSAGES_INIT initialized message cache for %1 messages of class %2 Debug message issued when a new message cache is issued. It lists the class of messages it can hold and the maximum size of the cache. @@ -50,8 +50,9 @@ Debug message. This may follow CACHE_MESSAGES_UPDATE and indicates that, while updating, the old instance is being removed prior of inserting a new one. % CACHE_MESSAGES_UNCACHEABLE not inserting uncacheable message %1/%2/%3 -Debug message, noting that the given message can not be cached. This is for -some reason described in RFC2308. +Debug message, noting that the given message can not be cached. This is because +there's no SOA record in the message. See RFG 2308 section 5 for more +information. % CACHE_MESSAGES_UNKNOWN no entry for %1 found in the message cache Debug message. The message cache didn't find any entry for the given key. @@ -119,18 +120,18 @@ Debug message. While trying to insert an RRset into the cache, it was discovered that there's no cache for the class of the RRset. Therefore the message will not be cached. -% CACHE_RRSET_EXPIRED found expired RRset %1/%2 -Debug message. There' the data requested in the RRset cache. However, it is +% CACHE_RRSET_EXPIRED found expired RRset %1/%2/%3 +Debug message. The requested data was found in the RRset cache. However, it is expired, so the cache removed it and is going to pretend nothing was found. % CACHE_RRSET_INIT initializing RRset cache for %2 RRsets of class %1 Debug message. The RRset cache to hold at most this many RRsets for the given class is being created. -% CACHE_RRSET_LOOKUP looking up %1/%2 in RRset cache +% CACHE_RRSET_LOOKUP looking up %1/%2/%3 in RRset cache Debug message. The resolver is trying to look up data in the RRset cache. -% CACHE_RRSET_NOT_FOUND no RRset found for %1/%2 +% CACHE_RRSET_NOT_FOUND no RRset found for %1/%2/%3 Debug message which can follow CACHE_RRSET_LOOKUP. This means the data is not in the cache. diff --git a/src/lib/cache/rrset_cache.cc b/src/lib/cache/rrset_cache.cc index 4a77d48ed8..1a5fd48dc5 100644 --- a/src/lib/cache/rrset_cache.cc +++ b/src/lib/cache/rrset_cache.cc @@ -36,7 +36,7 @@ RRsetCache::RRsetCache(uint32_t cache_size, new HashDeleter<RRsetEntry>(rrset_table_)) { LOG_DEBUG(logger, DBG_TRACE_BASIC, CACHE_RRSET_INIT).arg(cache_size). - arg(rrset_class); + arg(RRClass(rrset_class)); } RRsetEntryPtr @@ -44,7 +44,7 @@ RRsetCache::lookup(const isc::dns::Name& qname, const isc::dns::RRType& qtype) { LOG_DEBUG(logger, DBG_TRACE_DATA, CACHE_RRSET_LOOKUP).arg(qname). - arg(qtype); + arg(qtype).arg(RRClass(class_)); const string entry_name = genCacheEntryName(qname, qtype); RRsetEntryPtr entry_ptr = rrset_table_.get(HashKey(entry_name, @@ -56,7 +56,7 @@ RRsetCache::lookup(const isc::dns::Name& qname, return (entry_ptr); } else { LOG_DEBUG(logger, DBG_TRACE_DATA, CACHE_RRSET_EXPIRED).arg(qname). - arg(qtype); + arg(qtype).arg(RRClass(class_)); // the rrset entry has expired, so just remove it from // hash table and lru list. rrset_table_.remove(entry_ptr->hashKey()); @@ -65,7 +65,7 @@ RRsetCache::lookup(const isc::dns::Name& qname, } LOG_DEBUG(logger, DBG_TRACE_DATA, CACHE_RRSET_NOT_FOUND).arg(qname). - arg(qtype); + arg(qtype).arg(RRClass(class_)); return (RRsetEntryPtr()); } |