[master] 5014b338a Revert "kill stale oc for backend synth"
Nils Goroll
nils.goroll at uplex.de
Fri Mar 15 12:06:07 UTC 2019
commit 5014b338a9bc6e2304c8b4e74b0ad32204a5ecc9
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Fri Mar 15 13:01:54 2019 +0100
Revert "kill stale oc for backend synth"
This reverts commit de3e581eb49ac3fbfc0f001f3fcd7db5e1ffea7f.
tests/saintmode/test04.vtc from varnish-modules revealed that there may
be use cases where it is implied that vcl_backend_error will leave a
ttl=0 object and the sale object will remain in place.
This can be resolved by:
- return(abandon) for these cases or
- making the HSH_Kill conditional on bo->fetch_objcore->ttl > 0
but I already has concerns regarding the impact of this change and have
them even more now.
We need time to ponder about the consequences and a documented
inefficiency is better than unexpected behaviour in a release.
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index b320513fe..33a751ea2 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -776,8 +776,6 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
VSB_destroy(&synth_body);
HSH_Unbusy(wrk, bo->fetch_objcore);
ObjSetState(wrk, bo->fetch_objcore, BOS_FINISHED);
- if (bo->stale_oc != NULL)
- HSH_Kill(bo->stale_oc);
return (F_STP_DONE);
}
diff --git a/bin/varnishtest/tests/r02946.vtc b/bin/varnishtest/tests/r02946.vtc
deleted file mode 100644
index 06084791f..000000000
--- a/bin/varnishtest/tests/r02946.vtc
+++ /dev/null
@@ -1,33 +0,0 @@
-varnishtest "#2946 - objcore leak for backend_synth"
-
-varnish v1 -vcl {
- backend bad { .host = "${bad_backend}"; }
-
- sub vcl_backend_error {
- if (bereq.http.abandon) {
- return (abandon);
- }
- set beresp.status = 200;
- set beresp.ttl = 0.0001s;
- set beresp.grace = 1h;
- }
-} -start
-
-client c1 -repeat 20 -keepalive {
- txreq
- rxresp
- expect resp.status == 200
-
- delay 0.001
-} -run
-
-delay 2
-
-client c1 {
- txreq -hdr "abandon: true"
- rxresp
- expect resp.status == 200
- expect resp.http.age > 1
-} -run
-
-varnish v1 -expect n_objectcore == 1
More information about the varnish-commit
mailing list