cache stats were detached when flushing cache
This commit is contained in:
@@ -1167,6 +1167,7 @@ dns_cache_flush(dns_cache_t *cache) {
|
||||
}
|
||||
dns_db_detach(&cache->db);
|
||||
cache->db = db;
|
||||
dns_db_setcachestats(cache->db, cache->stats);
|
||||
UNLOCK(&cache->cleaner.lock);
|
||||
UNLOCK(&cache->lock);
|
||||
|
||||
|
||||
+1
-1
@@ -706,6 +706,7 @@ free_rbtdb_callback(isc_task_t *task, isc_event_t *event) {
|
||||
static void
|
||||
update_cachestats(dns_rbtdb_t *rbtdb, isc_result_t result) {
|
||||
INSIST(IS_CACHE(rbtdb));
|
||||
INSIST(rbtdb->cachestats != NULL);
|
||||
|
||||
switch (result) {
|
||||
case ISC_R_SUCCESS:
|
||||
@@ -7633,7 +7634,6 @@ dns_rbtdb_create
|
||||
}
|
||||
|
||||
rbtdb->cachestats = NULL;
|
||||
|
||||
rbtdb->rrsetstats = NULL;
|
||||
if (IS_CACHE(rbtdb)) {
|
||||
result = dns_rdatasetstats_create(mctx, &rbtdb->rrsetstats);
|
||||
|
||||
Reference in New Issue
Block a user