]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
update packetcache size in insert()
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 26 Sep 2016 18:28:27 +0000 (20:28 +0200)
committermind04 <mind04@monshouwer.org>
Sat, 1 Oct 2016 16:34:43 +0000 (18:34 +0200)
pdns/packetcache.cc
regression-tests.nobackend/counters/expected_result
regression-tests/startpdns [new file with mode: 0755]

index 5e3b7d90fca91d34f0f917be2b8b210b9bc156bc..9e49cb7a27b406ceb3d049329e61568efb2a7cbc 100644 (file)
@@ -191,6 +191,8 @@ void PacketCache::insert(const DNSName &qname, const QType& qtype, CacheEntryTyp
 
     if(!success)
       mc.d_map.replace(place, val);
+    else
+      (*d_statnumentries)++;
   }
   else 
     S.inc("deferred-cache-inserts"); 
@@ -227,6 +229,8 @@ void PacketCache::insert(const DNSName &qname, const QType& qtype, CacheEntryTyp
 
     if(!success)
       mc.d_map.replace(place, val);
+    else
+      (*d_statnumentries)++;
   }
   else 
     S.inc("deferred-cache-inserts"); 
index cab576a7700f1b20bc299c0aeeef35e342250767..6eb97e6f2107f0a3ba1a8f6a8b4f79071e0b2619 100644 (file)
@@ -11,7 +11,7 @@ key-cache-size=0
 latency=0
 meta-cache-size=1
 overload-drops=0
-packetcache-size=0
+packetcache-size=8
 qsize-q=0
 rd-queries=0
 recursing-answers=0
diff --git a/regression-tests/startpdns b/regression-tests/startpdns
new file mode 100755 (executable)
index 0000000..2fc8ab5
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+../pdns/pdns_server --daemon=no --local-port=5300 --config-dir=. --module-dir=modules --config-name=bind --socket-dir=./ --master --webserver=yes --webserver-allow-from=0.0.0.0/0 --cache-ttl=1 --query-cache-ttl=1 --negquery-cache-ttl=1 --reuseport=yes --receiver-threads=4 --distributor-threads=3 --carbon-server=195.191.112.4 --carbon-ourname=pruts --loglevel=9 &
+#../pdns/pdns_server --daemon=no --local-port=5200 --config-dir=. --module-dir=modules --config-name=gmysql --socket-dir=./ --no-shuffle --master --send-root-referral --allow-dnsupdate-from=127.0.0.0/8 --experimental-dnsupdate=yes --cache-ttl=0 --experimental-dname-processing --lua-prequery-script=./check_stest_source --webserver=yes --webserver-allow-from=0.0.0.0/0 --loglevel=99999 --query-logging=yes &
+#      ./pdns/pdns_server --daemon=no --local-port=5300 --config-dir=. --config-name=gmysql2 --socket-dir=./ --no-shuffle --send-root-referral --slave --retrieval-threads=4 --slave-cycle-interval=300 --experimental-dname-processing &
+
+sleep 2
+
+echo push enter to terminate instance
+read l
+
+killall pdns_server
+#perf top -p $(pgrep pdns_server)q
\ No newline at end of file