Mailing List Archive

#1818: Grace does not work for hit-for-pass objects
#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 | Keywords:
----------------------+-------------------
Objcores marked as hit-for-pass (OC_F_PASS flag) are not considered for
grace mode.

Grace is quite useful also for hit-for-pass, as it would let us avoid
waitlisting of requests after a HFP object goes stale.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1818>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1818: Grace does not work for hit-for-pass objects [ In reply to ]
#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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1818: Grace does not work for hit-for-pass objects [ In reply to ]
#1818: Grace does not work for hit-for-pass objects
----------------------+---------------------
Reporter: daghf | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
----------------------+---------------------
Changes (by phk):

* status: new => closed
* resolution: => fixed


Comment:

Fixed in 51e0af5ad29b9f1c15958c05b67dccfcb2beb95b

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1818#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs