[master] d895f1f52 vsl: Mask ExpKill logs by default

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Jan 13 06:26:06 UTC 2021


commit d895f1f52b8797a7dfd736af944054ce9aff35da
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed Jan 13 07:14:41 2021 +0100

    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

diff --git a/bin/varnishd/mgt/mgt_param_bits.c b/bin/varnishd/mgt/mgt_param_bits.c
index 6a113e72e..756db4159 100644
--- a/bin/varnishd/mgt/mgt_param_bits.c
+++ b/bin/varnishd/mgt/mgt_param_bits.c
@@ -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,
diff --git a/bin/varnishtest/tests/b00063.vtc b/bin/varnishtest/tests/b00063.vtc
index 7a68e2e2f..6879968e8 100644
--- a/bin/varnishtest/tests/b00063.vtc
+++ b/bin/varnishtest/tests/b00063.vtc
@@ -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) {
diff --git a/bin/varnishtest/tests/m00031.vtc b/bin/varnishtest/tests/m00031.vtc
index 2d40cb781..267f4b882 100644
--- a/bin/varnishtest/tests/m00031.vtc
+++ b/bin/varnishtest/tests/m00031.vtc
@@ -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;
 
diff --git a/bin/varnishtest/tests/r02339.vtc b/bin/varnishtest/tests/r02339.vtc
index 178e24a39..a90479a6a 100644
--- a/bin/varnishtest/tests/r02339.vtc
+++ b/bin/varnishtest/tests/r02339.vtc
@@ -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;
 
diff --git a/bin/varnishtest/tests/v00041.vtc b/bin/varnishtest/tests/v00041.vtc
index 388ab5f8c..f2b285277 100644
--- a/bin/varnishtest/tests/v00041.vtc
+++ b/bin/varnishtest/tests/v00041.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.$}


More information about the varnish-commit mailing list