From e59b57874ec274cf0e58168d288de5b25542cdd2 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sun, 15 Feb 2015 14:08:32 +0100 Subject: [PATCH] PacketHandler: Share UeberBackend with DNSSECKeeper Reduces number of backend instances by 50%, very relevant for setups that have backends with huge startup/runtime cost. --- pdns/packethandler.cc | 2 +- pdns/packethandler.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 7539dd085..de7ecabd7 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -58,7 +58,7 @@ enum root_referral { FULL_ROOT_REFERRAL }; -PacketHandler::PacketHandler():B(s_programname) +PacketHandler::PacketHandler():B(s_programname), d_dk(&B) { ++s_count; d_doDNAME=::arg().mustDo("experimental-dname-processing"); diff --git a/pdns/packethandler.hh b/pdns/packethandler.hh index 0c7d34084..50f9b9ebe 100644 --- a/pdns/packethandler.hh +++ b/pdns/packethandler.hh @@ -111,7 +111,7 @@ private: AuthLua* d_pdl; UeberBackend B; // every thread an own instance - DNSSECKeeper d_dk; // same, might even share B? + DNSSECKeeper d_dk; // B is shared with DNSSECKeeper }; void emitNSEC3(DNSBackend& B, const NSEC3PARAMRecordContent& ns3prc, const SOAData& sd, const std::string& unhashed, const std::string& begin, const std::string& end, const std::string& toNSEC3, DNSPacket *r, int mode); bool getNSEC3Hashes(bool narrow, DNSBackend* db, int id, const std::string& hashed, bool decrement, string& unhashed, string& before, string& after, int mode=0); -- 2.40.0