]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Name recursor threads consistently with a "rec/" prefix. 12399/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 9 Jan 2023 12:19:28 +0000 (13:19 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 9 Jan 2023 12:19:28 +0000 (13:19 +0100)
Use thread names without capitals, as they look a bit ugly otherwise.

Threads started by libfstrm are not named, as they are created internally by the lib.

Partly supsersedes #11138

pdns/recursordist/nod.cc
pdns/recursordist/rec-main.cc
pdns/recursordist/rpzloader.cc
pdns/remote_logger.cc
pdns/snmp-agent.cc
pdns/webserver.cc

index fd16679d319252698c7e1808ea8bf0eb463ee8fe..9c41df59075acb2c18a8f68d76d123eae570f4c5 100644 (file)
@@ -193,7 +193,7 @@ bool PersistentSBF::snapshotCurrent(std::thread::id tid)
 
 void NODDB::housekeepingThread(std::thread::id tid)
 {
-  setThreadName("pdns-r/NOD-hk");
+  setThreadName("rec/nod-hk");
   for (;;) {
     sleep(d_snapshot_interval);
     {
@@ -263,7 +263,7 @@ void UniqueResponseDB::addResponse(const std::string& response)
 
 void UniqueResponseDB::housekeepingThread(std::thread::id tid)
 {
-  setThreadName("pdns-r/UDR-hk");
+  setThreadName("rec/udr-hk");
   for (;;) {
     sleep(d_snapshot_interval);
     {
index 18f6c8eb9576b0750236da63dd5223ffe913adf3..ad0cb39fd596fd59f0c7ba00ba3c123e1bcb7e4a 100644 (file)
@@ -224,7 +224,7 @@ int RecThreadInfo::runThreads(Logr::log_t log)
     handlerInfo.start(0, "web+stat", cpusMap, log);
     auto& taskInfo = RecThreadInfo::info(2);
     taskInfo.setTaskThread();
-    taskInfo.start(2, "taskThread", cpusMap, log);
+    taskInfo.start(2, "task", cpusMap, log);
 
     auto& info = RecThreadInfo::info(currentThreadId);
     info.setListener();
@@ -278,7 +278,7 @@ int RecThreadInfo::runThreads(Logr::log_t log)
 
     for (unsigned int n = 0; n < RecThreadInfo::numTaskThreads(); ++n) {
       auto& info = RecThreadInfo::info(currentThreadId);
-      info.start(currentThreadId++, "taskThread", cpusMap, log);
+      info.start(currentThreadId++, "task", cpusMap, log);
     }
 
     /* This thread handles the web server, carbon, statistics and the control channel */
index df83ce07ac1d6dc50fa262a80190ee1199652836..16008f3b4621806d24044745937534c62dc32059 100644 (file)
@@ -383,7 +383,7 @@ static bool dumpZoneToDisk(Logr::log_t logger, const DNSName& zoneName, const st
 
 void RPZIXFRTracker(const std::vector<ComboAddress>& primaries, const boost::optional<DNSFilterEngine::Policy>& defpol, bool defpolOverrideLocal, uint32_t maxTTL, size_t zoneIdx, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, const uint16_t xfrTimeout, const uint32_t refreshFromConf, std::shared_ptr<SOARecordContent> sr, const std::string& dumpZoneFileName, uint64_t configGeneration)
 {
-  setThreadName("pdns-r/RPZIXFR");
+  setThreadName("rec/rpzixfr");
   bool isPreloaded = sr != nullptr;
   auto luaconfsLocal = g_luaconfs.getLocal();
 
index e9e2efe39d4705787509c93dcdd0aca1a2d5e8d0..94a8a94a8b262ffcb9e66399620d398fb53c0328 100644 (file)
@@ -191,7 +191,7 @@ void RemoteLogger::maintenanceThread()
 {
   try {
 #ifdef WE_ARE_RECURSOR
-    string threadName = "pdns-r/remLog";
+    string threadName = "rec/remlog";
 #else
     string threadName = "dnsdist/remLog";
 #endif
index 4b2bc6b0278525cf89e5860010a0edc93c312fe6..f00bf6d6c96a2ed093c09730b05fa5ab9f2d699f 100644 (file)
@@ -107,7 +107,7 @@ void SNMPAgent::worker()
   }
 
 #ifdef RECURSOR
-  string threadName = "pdns-r/SNMP";
+  string threadName = "rec/snmp";
 #else
   string threadName = "dnsdist/SNMP";
 #endif
index 874e7cfac6e49c5ac8687af90ff138a414b5c5b5..f6f540789d8f0f512b50c06e135364e46faa6886 100644 (file)
@@ -237,7 +237,7 @@ void WebServer::registerWebHandler(const string& url, const HandlerFunction& han
 }
 
 static void *WebServerConnectionThreadStart(const WebServer* webServer, std::shared_ptr<Socket> client) {
-  setThreadName("pdns-r/webhndlr");
+  setThreadName("rec/webhndlr");
   const std::string msg = "Exception while serving a connection in main webserver thread";
   try {
     webServer->serveConnection(client);