From: Otto Moerbeek Date: Tue, 17 Jun 2025 09:47:11 +0000 (+0200) Subject: auth: stop maintaining vector of backend instances X-Git-Tag: dnsdist-2.0.0-beta1~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15689%2Fhead;p=thirdparty%2Fpdns.git auth: stop maintaining vector of backend instances Unused. Fixes #15688 Signed-off-by: Otto Moerbeek --- diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 0cd8211ff2..f686ac59df 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -41,8 +41,6 @@ extern StatBag S; -LockGuarded> UeberBackend::d_instances; - // initially we are blocked bool UeberBackend::d_go = false; bool UeberBackend::s_doANYLookupsOnly = false; @@ -717,10 +715,6 @@ bool UeberBackend::autoPrimaryBackend(const string& ipAddr, const ZoneName& doma UeberBackend::UeberBackend(const string& pname) { - { - d_instances.lock()->push_back(this); // report to the static list of ourself - } - d_cache_ttl = ::arg().asNum("query-cache-ttl"); d_negcache_ttl = ::arg().asNum("negquery-cache-ttl"); @@ -791,13 +785,7 @@ void UeberBackend::alsoNotifies(const ZoneName& domain, set* ips) UeberBackend::~UeberBackend() { - DLOG(g_log << Logger::Error << "UeberBackend destructor called, removing ourselves from instances, and deleting our backends" << endl); - - { - auto instances = d_instances.lock(); - [[maybe_unused]] auto end = remove(instances->begin(), instances->end(), this); - instances->resize(instances->size() - 1); - } + DLOG(g_log << Logger::Error << "UeberBackend destructor called, deleting our backends" << endl); backends.clear(); } diff --git a/pdns/ueberbackend.hh b/pdns/ueberbackend.hh index af85b1a541..d9a0b7cb94 100644 --- a/pdns/ueberbackend.hh +++ b/pdns/ueberbackend.hh @@ -53,11 +53,6 @@ public: bool autoPrimaryRemove(const struct AutoPrimary& primary); bool autoPrimariesList(std::vector& primaries); - /** Tracks all created UeberBackend instances for us. We use this vector to notify - existing threads of new modules - */ - static LockGuarded> d_instances; - static bool loadmodule(const string& name); static bool loadModules(const vector& modules, const string& path);