[Varnish] #1818: Grace does not work for hit-for-pass objects
Varnish
varnish-bugs at varnish-cache.org
Wed Nov 18 13:04:04 CET 2015
#1818: Grace does not work for hit-for-pass objects
----------------------+--------------------
Reporter: daghf | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------
Comment (by daghf):
Test case. The request from client c2 ends up being waitlisted, and thus
ends up in a deadlock situation.
{{{
varnishtest "#1818: verify that grace works for hit_for_pass objects"
server s1 {
rxreq
expect req.http.a == "1"
txresp
rxreq
expect req.http.b == "1"
sema r2 sync 2
sema r1 sync 2
txresp
} -start
server s2 {
rxreq
expect req.http.c == "1"
sema r1 sync 2
txresp
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
if (req.http.c) {
set req.backend_hint = s2;
}
}
sub vcl_miss {
set req.http.miss = "1";
}
sub vcl_pass {
set req.http.pass = "1";
}
sub vcl_deliver {
if (req.http.miss) {
set resp.http.miss = req.http.miss;
}
if (req.http.pass) {
set resp.http.pass = req.http.pass;
}
}
sub vcl_backend_response {
set beresp.ttl = 0.1s;
set beresp.grace = 1m;
set beresp.uncacheable = true;
}
} -start
client c1 {
txreq -hdr "a: 1"
rxresp
delay .2
txreq -hdr "b: 1"
rxresp
expect resp.http.miss == "1"
} -start
client c2 {
sema r2 sync 2
txreq -hdr "c: 1"
rxresp
expect resp.http.pass == "1"
} -run
}}}
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1818#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list