[master] ae15fd7 Don't increment the hitpass stat for HfM

Federico G. Schwindt fgsch at lodoss.net
Fri Mar 3 17:18:05 CET 2017


commit ae15fd7f67f42e9b3de4cfb9500b8610465117f9
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Fri Mar 3 16:03:25 2017 +0000

    Don't increment the hitpass stat for HfM

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 5e08fc8..6102009 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -440,7 +440,6 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
 				wrk->stats->cache_hitpass++;
 				oc = NULL;
 			} else if (oc->flags & OC_F_PASS) {
-				wrk->stats->cache_hitpass++;
 				oc = NULL;
 				*bocp = hsh_insert_busyobj(wrk, oh);
 			} else {
diff --git a/bin/varnishtest/tests/c00014.vtc b/bin/varnishtest/tests/c00014.vtc
index 41eb00b..34f816a 100644
--- a/bin/varnishtest/tests/c00014.vtc
+++ b/bin/varnishtest/tests/c00014.vtc
@@ -43,4 +43,5 @@ client c2 {
 
 client c1 -wait
 
-varnish v1 -expect cache_hitpass == 1
+varnish v1 -expect cache_hitpass == 0
+varnish v1 -expect cache_miss == 2
diff --git a/bin/varnishtest/tests/c00081.vtc b/bin/varnishtest/tests/c00081.vtc
index f119570..24f3b21 100644
--- a/bin/varnishtest/tests/c00081.vtc
+++ b/bin/varnishtest/tests/c00081.vtc
@@ -44,3 +44,6 @@ client c1 {
 	rxresp
 	expect resp.http.miss == True
 } -run
+
+varnish v1 -expect MAIN.cache_hitpass == 1
+varnish v1 -expect MAIN.cache_miss == 2
diff --git a/bin/varnishtest/tests/r00425.vtc b/bin/varnishtest/tests/r00425.vtc
index 1c2c19f..6c131cf 100644
--- a/bin/varnishtest/tests/r00425.vtc
+++ b/bin/varnishtest/tests/r00425.vtc
@@ -29,4 +29,5 @@ client c1 {
 	rxresp
 } -run
 
-varnish v1 -expect cache_hitpass == 2
+varnish v1 -expect cache_hitpass == 0
+varnish v1 -expect cache_miss == 3



More information about the varnish-commit mailing list