Browse Source

[1067] small update to ttl mismatch log message

Jelte Jansen 13 years ago
parent
commit
6ea996c67d
2 changed files with 9 additions and 9 deletions
  1. 2 2
      src/lib/datasrc/database.cc
  2. 7 7
      src/lib/datasrc/datasrc_messages.mes

+ 2 - 2
src/lib/datasrc/database.cc

@@ -352,12 +352,12 @@ public:
         RRsetPtr rrset(new RRset(name, class_, rtype, RRTTL(ttl)));
         while (data_ready_ && name_ == name_str && rtype_str == rtype_) {
             if (ttl_ != ttl) {
-                LOG_WARN(logger, DATASRC_DATABASE_ITERATE_TTL_DIFF).
-                    arg(name_).arg(ttl).arg(ttl_);
                 if (ttl < ttl_) {
                     ttl_ = ttl;
                     rrset->setTTL(RRTTL(ttl));
                 }
+                LOG_WARN(logger, DATASRC_DATABASE_ITERATE_TTL_MISMATCH).
+                    arg(name_).arg(class_).arg(rtype_).arg(rrset->getTTL());
             }
             rrset->addRdata(rdata::createRdata(rtype, class_, rdata_));
             getData();

+ 7 - 7
src/lib/datasrc/datasrc_messages.mes

@@ -75,8 +75,9 @@ name and type in the database.
 
 % DATASRC_DATABASE_FIND_TTL_MISMATCH TTL values differ in %1 for elements of %2/%3/%4, setting to %5
 The datasource backend provided resource records for the given RRset with
-different TTL values. The TTL of the RRSET is set to the lowest value, which
-is printed in the log message.
+different TTL values. This isn't allowed on the wire and is considered
+an error, so we set it to the lowest value we found (but we don't modify the
+database). The data in database should be checked and fixed.
 
 % DATASRC_DATABASE_FIND_UNCAUGHT_ERROR uncaught general error retrieving data from datasource %1: %2
 There was an uncaught general exception while reading data from a datasource.
@@ -114,12 +115,11 @@ While iterating through the zone, the program reached end of the data.
 While iterating through the zone, the program extracted next RRset from it.
 The name and RRtype of the RRset is indicated in the message.
 
-% DATASRC_DATABASE_ITERATE_TTL_DIFF TTL for %1/%2 differs (%3 and %4)
+% DATASRC_DATABASE_ITERATE_TTL_MISMATCH TTL values differ for RRs of %1/%2/%3, setting to %4
 While iterating through the zone, the time to live for RRs of the given RRset
-was discovered not to be the same the same This isn't allowed on the wire and
-is considered generally broken, so we set it to the lowest of them internaly
-(but we don't modify the database). But the data in database should better be
-checked and fixed by human.
+were found to be different. This isn't allowed on the wire and is considered
+an error, so we set it to the lowest value we found (but we don't modify the
+database). The data in database should be checked and fixed.
 
 % DATASRC_DO_QUERY handling query for '%1/%2'
 A debug message indicating that a query for the given name and RR type is being