BIND 10 #661: The rrset entry in cache should be touched/removed properly.

BIND 10 Development do-not-reply at isc.org
Thu Mar 10 07:59:17 UTC 2011


#661: The rrset entry in cache should be touched/removed properly.
-------------------------------------+-------------------------------------
                 Reporter:           |                Owner:  ocean
  zhanglikun                         |               Status:  reviewing
                     Type:  defect   |            Milestone:  R-Team-
                 Priority:  major    |  Sprint-20110316
                Component:           |           Resolution:
  resolver                           |            Sensitive:  0
                 Keywords:           |  Add Hours to Ticket:  0
Estimated Number of Hours:  0.0      |          Total Hours:  0
                Billable?:  1        |
                Internal?:  0        |
-------------------------------------+-------------------------------------

Comment (by ocean):

 Replying to [comment:4 zhanglikun]:
 > well, the following change has been committed to trac661, please have a
 look.
 > When looking up the message or rrset in the cache, expired entries will
 be removed from the cache and lru list automatically. Now the expired
 entries will be removed until it is looked up, or dropped when adding a
 new entry to the cache and the cache lru list is full, or overwritten by a
 new entry.

 Suggest to refactor the function of RRsetCache::update() to:
 {{{
  if(entry_ptr && entry_ptr->getTrustLevel() > level) {
     return (entry_ptr);
  }

  // Replace the old entry with higher trust-level entry
  rrset_lru_.remove(entry_ptr);
  entry_ptr.reset(new RRsetEntry(rrset, level));
  ...
 }}}
 So logic will be more clear and more readable

-- 
Ticket URL: <http://bind10.isc.org/ticket/661#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list