]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Only record one hit or miss per query in the cache metrics
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 Jan 2023 16:17:21 +0000 (17:17 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 12 Jan 2023 11:03:27 +0000 (12:03 +0100)
commitad9a0329bc07026e7d913964ee06c6b013bda063
tree4f9b0f931ac7401cc50093152cbe9c129a5e1fa1
parent17bd955664bc44d4f36e4c0bfb814f5027e3f712
dnsdist: Only record one hit or miss per query in the cache metrics

The scope-zero feature and the DoH paths can actually do more than
one lookup per query, and until now this led to an increase of the
per-cache metric for every lookup, while the global `cache-hits`
and `cache-misses` metrics were only updated once per query.
This has led to several questions and misunderstandings, so we now
only update the per-cache metrics once per query as well.
pdns/dnsdist-cache.cc
pdns/dnsdist-cache.hh
pdns/dnsdist.cc