fix(dns): spam ttl logs for prepared queries (#21381)

This commit is contained in:
Dan Stough 2024-07-08 10:34:00 -04:00 committed by GitHub
parent 40ca4ad6d0
commit a251f8ad80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

4
.changelog/21381.txt Normal file
View File

@ -0,0 +1,4 @@
```release-note:bug
dns: Fixes a spam log message "Failed to parse TTL for prepared query..."
that was always being logged on each prepared query evaluation.
```

View File

@ -363,11 +363,12 @@ func (f *V1DataFetcher) FetchPreparedQuery(ctx Context, req *QueryPayload) ([]*R
if err == nil { if err == nil {
ttlSec := uint32(ttl / time.Second) ttlSec := uint32(ttl / time.Second)
ttlOverride = &ttlSec ttlOverride = &ttlSec
} else {
f.logger.Warn("Failed to parse TTL for prepared query , ignoring",
"ttl", out.DNS.TTL,
"prepared_query", req.Name,
)
} }
f.logger.Warn("Failed to parse TTL for prepared query , ignoring",
"ttl", out.DNS.TTL,
"prepared_query", req.Name,
)
} }
// If we have no nodes, return not found! // If we have no nodes, return not found!