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 commit a9383e4b95)
This commit is contained in:
Ondřej Surý 2024-02-20 08:50:58 +01:00
parent 5709230a3e
commit abe080d16e
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41

View file

@ -972,6 +972,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);
}
}
static bool