]> granicus.if.org Git - pdns/commitdiff
GSQLBackend::getUnfreshSlaveInfos: log row assertion only once
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 15 Mar 2019 14:29:37 +0000 (15:29 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 21 Mar 2019 09:37:07 +0000 (10:37 +0100)
pdns/backends/gsql/gsqlbackend.cc

index 412a3768cd1b5904460ff08322fa347eb0e8afad..691ff810a5750110b6180eaf57522f1740631cb5 100644 (file)
@@ -339,12 +339,16 @@ void GSQLBackend::getUnfreshSlaveInfos(vector<DomainInfo> *unfreshDomains)
 
   vector<DomainInfo> allSlaves;
 
+  bool loggedAssertRowColumns = false;
   for(const auto& row : d_result) { // id,name,master,last_check
     DomainInfo sd;
     try {
       ASSERT_ROW_COLUMNS("info-all-slaves-query", row, 4);
     } catch(const PDNSException &e) {
-      g_log<<Logger::Warning<<e.reason<<endl;
+      if (!loggedAssertRowColumns) {
+        g_log<<Logger::Warning<<e.reason<<endl;
+      }
+      loggedAssertRowColumns = true;
       continue;
     }