From: Otto Moerbeek Date: Wed, 23 Sep 2020 14:06:32 +0000 (+0200) Subject: A few more g_negache un-threading cases. X-Git-Tag: auth-4.4.0-alpha2~66^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29d7557748a590a8ee0fe2f4ff2ccadbb1882e50;p=thirdparty%2Fpdns.git A few more g_negache un-threading cases. --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 2cd4a86dd6..26641c7451 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -3150,11 +3150,12 @@ static void doStats(void) uint64_t cacheSize = g_recCache->size(); auto rc_stats = g_recCache->stats(); double r = rc_stats.second == 0 ? 0.0 : (100.0 * rc_stats.first / rc_stats.second); - + uint64_t negCacheSize = g_negCache->size(); + if(g_stats.qcounter && (cacheHits + cacheMisses) && SyncRes::s_queries && SyncRes::s_outqueries) { g_log<(pleaseGetNegCacheSize)<<" negative entries, "<< + negCacheSize<<" negative entries, "<< (int)((cacheHits*100.0)/(cacheHits+cacheMisses))<<"% cache hits"<