Commit d895f1f5 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vsl: Mask ExpKill logs by default

Based on anecdotal evidence that it is not often used, and the concern
of lock contention it might contribute to since such records are emitted
unbuffered for every single expiry event, it is now disabled by default.

ExpKill records are still available if needed for example for debugging
purposes, and are enabled in the 3 test cases where we use them. They
were also getting in the way of 1 test.

Closes #3475
parent 9dcbe09d
......@@ -138,6 +138,7 @@ tweak_vsl_mask(struct vsb *vsb, const struct parspec *par, const char *arg)
(void)bit(mgt_param.vsl_mask, SLT_ObjReason, BSET);
(void)bit(mgt_param.vsl_mask, SLT_ObjStatus, BSET);
(void)bit(mgt_param.vsl_mask, SLT_Debug, BSET);
(void)bit(mgt_param.vsl_mask, SLT_ExpKill, BSET);
} else {
return (bit_tweak(vsb, mgt_param.vsl_mask,
SLT__Reserved, arg, VSL_tags,
......
......@@ -31,6 +31,7 @@ server s1 {
txresp -body "4"
} -start
varnish v1 -cliok "param.set vsl_mask +ExpKill"
varnish v1 -vcl+backend {
sub vcl_backend_response {
if (beresp.status >= 500 && bereq.is_bgfetch) {
......
......@@ -14,6 +14,7 @@ server s1 {
txresp -hdr "Vary: Accept-Language" -body en
} -start
varnish v1 -cliok "param.set vsl_mask +ExpKill"
varnish v1 -vcl+backend {
import purge;
......
......@@ -5,7 +5,9 @@ server s1 -repeat 12 {
txresp
} -start
varnish v1 -arg "-p thread_pools=1" -vcl+backend {
varnish v1 -cliok "param.set thread_pools 1"
varnish v1 -cliok "param.set vsl_mask +ExpKill"
varnish v1 -vcl+backend {
import purge;
import vtc;
......
......@@ -108,7 +108,7 @@ varnish v1 -arg "-p debug=+vclrel -p workspace_client=1m" -vcl+backend {
} -start
logexpect l0 -v v1 -g raw -d 1 -m -q "vxid == 0 and not ExpKill" {
logexpect l0 -v v1 -g raw -d 1 -m -q "vxid == 0" {
expect 0 0 CLI {^Rd vcl.load}
expect 0 = Debug {^test_priv_task.*new.$}
expect 0 = Debug {^test_priv_task.*update.$}
......
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