mirror of https://github.com/status-im/consul.git
fix(dns): spam ttl logs for prepared queries (#21381)
This commit is contained in:
parent
40ca4ad6d0
commit
a251f8ad80
|
@ -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.
|
||||||
|
```
|
|
@ -363,12 +363,13 @@ 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",
|
f.logger.Warn("Failed to parse TTL for prepared query , ignoring",
|
||||||
"ttl", out.DNS.TTL,
|
"ttl", out.DNS.TTL,
|
||||||
"prepared_query", req.Name,
|
"prepared_query", req.Name,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If we have no nodes, return not found!
|
// If we have no nodes, return not found!
|
||||||
if len(out.Nodes) == 0 {
|
if len(out.Nodes) == 0 {
|
||||||
|
|
Loading…
Reference in New Issue