mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
Remove expired rdataset headers from the heap
It was discovered that an expired header could sit on top of the heap a little longer than desireable. Remove expired headers (headers with rdh_ttl set to 0) from the heap completely, so they don't block the next TTL-based cleaning. (cherry picked from commita9383e4b95) (cherry picked from commit756555dbcf)
This commit is contained in:
parent
9f4790d7cc
commit
1c3dd0d0ff
1 changed files with 4 additions and 0 deletions
|
|
@ -904,6 +904,10 @@ set_ttl(dns_rbtdb_t *rbtdb, rdatasetheader_t *header, dns_ttl_t newttl) {
|
|||
} else {
|
||||
isc_heap_decreased(heap, header->heap_index);
|
||||
}
|
||||
|
||||
if (newttl == 0) {
|
||||
isc_heap_delete(heap, header->heap_index);
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
|
|
|
|||
Loading…
Reference in a new issue