diff --git a/CHANGES b/CHANGES index 6a891e683fbca9ef840316b6667e97cd2afe5d8e..a27f2fab3a9519b21134cafe87ca5a0e8ea73725 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4720. [func] Added a statistics counter to track prefetch + queries. [RT #45847] + 4719. [bug] Address PVS static analyzer warnings. [RT #45946] 4718. [func] Avoid seaching for a owner name compression pointer diff --git a/bin/named/bind9.xsl b/bin/named/bind9.xsl index e39dbd82bc17b9da20ab3ce915f4149682686630..d34bf9872d70967f6bd105d2428bc9043cc579b3 100644 --- a/bin/named/bind9.xsl +++ b/bin/named/bind9.xsl @@ -9,7 +9,7 @@ - + diff --git a/bin/named/bind9.xsl.h b/bin/named/bind9.xsl.h index 613805d5009b4f8524be774447d5e16426cfaccc..28f36224cdc1db06cbec2abd8ac99ac91a33d299 100644 --- a/bin/named/bind9.xsl.h +++ b/bin/named/bind9.xsl.h @@ -14,7 +14,7 @@ static char xslmsg[] = "\n" "\n" " \n" - " \n" + " \n" " \n" " \n" " \n" diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index 4332fa1a8f668ec8b9c75a446e7deb8ea7fac46b..67a451803ef863cd5618ca3b1e0eafb75c4e5ab5 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -301,6 +301,7 @@ init_desc(void) { SET_NSSTATDESC(usedstale, "successful uses of stale cache data after lookup failure", "QryUsedStale"); + SET_NSSTATDESC(prefetch, "queries triggered prefetch", "Prefetch"); INSIST(i == ns_statscounter_max); /* Initialize resolver statistics */ @@ -1548,7 +1549,7 @@ generatexml(named_server_t *server, isc_uint32_t flags, ISC_XMLCHAR "type=\"text/xsl\" href=\"/bind9.xsl\"")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "statistics")); TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "version", - ISC_XMLCHAR "3.9")); + ISC_XMLCHAR "3.10")); /* Set common fields for statistics dump */ dumparg.type = isc_statsformat_xml; @@ -2309,7 +2310,7 @@ generatejson(named_server_t *server, size_t *msglen, /* * These statistics are included no matter which URL we use. */ - obj = json_object_new_string("1.3"); + obj = json_object_new_string("1.4"); CHECKMEM(obj); json_object_object_add(bindstats, "json-stats-version", obj); diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml index 03f95b0e6dcd572a88d457fae7d0fcc3f6c1b1ed..22be2e53b2f53479d40be3296dd3f68c69112319 100644 --- a/doc/arm/notes.xml +++ b/doc/arm/notes.xml @@ -476,6 +476,12 @@ matching cookie-secret. + + + A new statistics counter has been added to track prefetch + queries. [RT #45847] + + diff --git a/lib/ns/include/ns/stats.h b/lib/ns/include/ns/stats.h index f3e485eae7e19220e97534f0ea5aab493a38fb42..cb734f4524f0824b295c66b00cebdaaa06497ca6 100644 --- a/lib/ns/include/ns/stats.h +++ b/lib/ns/include/ns/stats.h @@ -96,7 +96,9 @@ enum { ns_statscounter_trystale = 61, ns_statscounter_usedstale = 62, - ns_statscounter_max = 63 + ns_statscounter_prefetch = 63, + + ns_statscounter_max = 64 }; void diff --git a/lib/ns/query.c b/lib/ns/query.c index 93841266a8e1434607729a2f260ba8596d86ec4a..1ed2a43e030649ea781d0b3548b723ed8137b2d7 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -2473,6 +2473,8 @@ query_prefetch(ns_client_t *client, dns_name_t *qname, ns_client_detach(&dummy); } dns_rdataset_clearprefetch(rdataset); + ns_stats_increment(client->sctx->nsstats, + ns_statscounter_prefetch); } static inline void