BIND 10 #661: The rrset entry in cache should be touched/removed properly.
BIND 10 Development
do-not-reply at isc.org
Fri Mar 11 01:54:55 UTC 2011
#661: The rrset entry in cache should be touched/removed properly.
-------------------------------------+-------------------------------------
Reporter: | Owner: zhanglikun
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 zhanglikun):
Replying to [comment:5 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));
> ...
> }}}
> The logic will be more clear and the code will be more readable
We have to check if the entry_ptr is empty before removing it from lru
list.
--
Ticket URL: <https://bind10.isc.org/ticket/661#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list