Commit 2261dcfd authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Change type of oc->last_lru from float back to double

Since the last_lru tracks epoch time, it needs the double precision
floating point type to accurately track the time.

Fixes: #2527
parent ba14fe3c
......@@ -376,7 +376,7 @@ struct objcore {
uint16_t oa_present;
unsigned timer_idx; // XXX 4Gobj limit
float last_lru;
double last_lru;
VTAILQ_ENTRY(objcore) hsh_list;
VTAILQ_ENTRY(objcore) lru_list;
VTAILQ_ENTRY(objcore) ban_list;
......
varnishtest "Test the n_lru_moved counter"
server s1 {
rxreq
txresp
} -start
varnish v1 -arg "-p lru_interval=1" -vcl+backend {
sub vcl_backend_response {
set beresp.do_stream = false;
}
} -start
client c1 {
txreq
rxresp
} -run
varnish v1 -expect MAIN.n_lru_moved == 0
delay 1
client c1 {
txreq
rxresp
txreq
rxresp
} -run
varnish v1 -expect MAIN.n_lru_moved == 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment