From: Otto Moerbeek Date: Wed, 2 Feb 2022 08:06:42 +0000 (+0100) Subject: Move the pruning of the two now shared maps (failed servers and non-resolving ns... X-Git-Tag: auth-4.7.0-alpha1~23^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=472cba766a9c49fa9739a52cd317082d98194c13;p=thirdparty%2Fpdns.git Move the pruning of the two now shared maps (failed servers and non-resolving ns) to the handler thread --- diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index 202223fee4..c44edd4024 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -1797,14 +1797,11 @@ static void houseKeeping(void*) limit = now.tv_sec - 300; SyncRes::pruneNSSpeeds(limit); } - limit = now.tv_sec - SyncRes::s_serverdownthrottletime * 10; - SyncRes::pruneFailedServers(limit); limit = now.tv_sec - 2 * 3600; SyncRes::pruneEDNSStatuses(limit); SyncRes::pruneThrottledServers(); - SyncRes::pruneNonResolving(now.tv_sec - SyncRes::s_nonresolvingnsthrottletime); - Utility::gettimeofday(&t_last_prune, nullptr); t_tcp_manager.cleanup(now); + Utility::gettimeofday(&t_last_prune, nullptr); } if (isHandlerThread()) { @@ -1823,6 +1820,8 @@ static void houseKeeping(void*) if (g_aggressiveNSECCache) { g_aggressiveNSECCache->prune(now.tv_sec); } + SyncRes::pruneFailedServers(now.tv_sec - SyncRes::s_serverdownthrottletime * 10); + SyncRes::pruneNonResolving(now.tv_sec - SyncRes::s_nonresolvingnsthrottletime); s_last_RC_prune = now.tv_sec; } // Divide by 12 to get the original 2 hour cycle if s_maxcachettl is default (1 day)