uint_least16_t attributes = atomic_load_acquire(&header->attributes);
uint_least16_t newattributes = 0;
qpcache_t *qpdb = HEADERNODE(header)->qpdb;
- dns_stats_t *stats = NULL;
/*
* If we are already ancient there is nothing to do.
* Decrement and increment the stats counter for the appropriate
* RRtype.
*/
- stats = dns_db_getrrsetstats(&qpdb->common);
- update_rrsetstats(stats, header->typepair, attributes, false);
- update_rrsetstats(stats, header->typepair, newattributes, true);
+ update_rrsetstats(qpdb->rrsetstats, header->typepair, attributes,
+ false);
+ update_rrsetstats(qpdb->rrsetstats, header->typepair, newattributes,
+ true);
}
static void
isc_heap_destroy(&qpdb->buckets[i].heap);
}
- if (qpdb->rrsetstats != NULL) {
- dns_stats_detach(&qpdb->rrsetstats);
- }
+ dns_stats_detach(&qpdb->rrsetstats);
+
if (qpdb->cachestats != NULL) {
isc_stats_detach(&qpdb->cachestats);
}
NODE_WRLOCK(nlock, &nlocktype);
- if (qpdb->rrsetstats != NULL) {
- DNS_SLABHEADER_SETATTR(newheader, DNS_SLABHEADERATTR_STATCOUNT);
- update_rrsetstats(qpdb->rrsetstats, newheader->typepair,
- atomic_load_acquire(&newheader->attributes),
- true);
- }
-
expire_ttl_headers(qpdb, qpnode->locknum, &nlocktype, &tlocktype,
now DNS__DB_FLARG_PASS);
nlocktype, tlocktype DNS__DB_FLARG_PASS);
if (result == ISC_R_SUCCESS) {
+ DNS_SLABHEADER_SETATTR(newheader, DNS_SLABHEADERATTR_STATCOUNT);
+ update_rrsetstats(qpdb->rrsetstats, newheader->typepair,
+ newheader->attributes, true);
+
if (delegating) {
qpnode->delegating = 1;
}