]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Small fixes in comments and log messages from review 13195/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 19 Sep 2023 07:24:52 +0000 (09:24 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 19 Sep 2023 07:24:52 +0000 (09:24 +0200)
pdns/recursordist/rec-main.cc
pdns/recursordist/rec-tcp.cc

index dc192506f5e73a8c9787ead995a7ee505d612cbf..9303399531e51fa315e694120d6006f1018f4691 100644 (file)
@@ -223,8 +223,8 @@ int RecThreadInfo::runThreads(Logr::log_t log)
   const auto cpusMap = parseCPUMap(log);
 
   if (RecThreadInfo::numDistributors() + RecThreadInfo::numUDPWorkers() == 1) {
-    SLOG(g_log << Logger::Warning << "Operating with single distributor/worker thread" << endl,
-         log->info(Logr::Notice, "Operating with single distributor/worker thread"));
+    SLOG(g_log << Logger::Warning << "Operating with single UDP distributor/worker thread" << endl,
+         log->info(Logr::Notice, "Operating with single UDP distributor/worker thread"));
 
     /* This thread handles the web server, carbon, statistics and the control channel */
     unsigned int currentThreadId = 0;
index a5a921cd49a31f6000f2a051440a8e264ec1aa14..ca3c3b3e3687f1ae354a366352b78e3d2b4b2dc3 100644 (file)
@@ -27,6 +27,8 @@
 #include "mplexer.hh"
 #include "uuid-utils.hh"
 
+// OLD PRE 5.0.0 situation:
+//
 // When pdns-distributes-queries is false with reuseport true (the default since 4.9.0), TCP queries
 // are read and handled by worker threads. If the kernel balancing is OK for TCP sockets (observed
 // to be good on Debian bullseye, but not good on e.g. MacOS), the TCP handling is no extra burden.
@@ -34,7 +36,7 @@
 // queries do get distributed round-robin over the worker threads.  Do note the TCP queries might
 // need to wait until the g_maxUDPQueriesPerRound is reached.
 //
-// In the case of pdns-distributes-queries true and reuseport false the queries are read and
+// In the case of pdns-distributes-queries true and reuseport false the queries were read and
 // initially processed by the distributor thread(s).
 //
 // Initial processing consist of parsing, calling gettag and checking if we have a packet cache
 // final answer will be sent by the same distributor thread that originally picked up the query.
 //
 // Changing this, and having incoming TCP queries handled by worker threads is somewhat more complex
-// than UDP, as the socket must remain avaiable in the distributor thread (for reading more
+// than UDP, as the socket must remain available in the distributor thread (for reading more
 // queries), but the TCP socket must also be passed to a worker thread so it can write its
 // answer. The in-flight bookkeeping also has to be aware of how a query is handled to do the
 // accounting properly. I am not sure if changing the current setup is worth all this trouble,
 // especially since the default is now to not use pdns-distributes-queries, which works well in many
 // cases.
 //
+// NEW SITUATION SINCE 5.0.0:
+//
 // The drawback mentioned in https://github.com/PowerDNS/pdns/issues/8394 are not longer true, so an
 // alternative approach would be to introduce dedicated TCP worker thread(s).
 //
-// And this approach was implemented in https://github.com/PowerDNS/pdns/pull/13195. The distributor
-// and worker thread(s) now no longe process TCP queries.
+// This approach was implemented in https://github.com/PowerDNS/pdns/pull/13195. The distributor and
+// worker thread(s) now no longer process TCP queries.
 
 size_t g_tcpMaxQueriesPerConn;
 unsigned int g_maxTCPPerClient;