mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00: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.
This commit is contained in:
parent
96171e9879
commit
a9383e4b95
@ -337,6 +337,10 @@ dns__rbtdb_setttl(dns_slabheader_t *header, dns_ttl_t newttl) {
|
|||||||
} else {
|
} else {
|
||||||
isc_heap_decreased(header->heap, header->heap_index);
|
isc_heap_decreased(header->heap, header->heap_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newttl == 0) {
|
||||||
|
isc_heap_delete(header->heap, header->heap_index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
@ -4851,7 +4855,6 @@ dns__rbtdb_deletedata(dns_db_t *db ISC_ATTR_UNUSED,
|
|||||||
if (header->heap != NULL && header->heap_index != 0) {
|
if (header->heap != NULL && header->heap_index != 0) {
|
||||||
isc_heap_delete(header->heap, header->heap_index);
|
isc_heap_delete(header->heap, header->heap_index);
|
||||||
}
|
}
|
||||||
header->heap_index = 0;
|
|
||||||
|
|
||||||
if (IS_CACHE(rbtdb)) {
|
if (IS_CACHE(rbtdb)) {
|
||||||
update_rrsetstats(rbtdb->rrsetstats, header->type,
|
update_rrsetstats(rbtdb->rrsetstats, header->type,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user