Commit 2023864a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a diag_bitmap that causes worker threads to release their VCL

after each request, so we do not have to contort testcases around
the exact scheduling of worker threads.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5472 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9d76846e
......@@ -190,6 +190,8 @@ wrk_thread_real(struct wq *qp, unsigned shm_workspace, unsigned sess_workspace,
AZ(w->wfd);
assert(w->wlp == w->wlb);
w->wrq = NULL;
if (params->diag_bitmap & 0x00040000)
VCL_Rel(&w->vcl);
if (!Lck_Trylock(&wstat_mtx)) {
wrk_sumstat(w);
Lck_Unlock(&wstat_mtx);
......
......@@ -771,6 +771,7 @@ static const struct parspec input_parspec[] = {
#endif
" 0x00010000 - synchronize shmlog.\n"
" 0x00020000 - synchronous start of persistence.\n"
" 0x00040000 - release VCL early.\n"
" 0x80000000 - do edge-detection on digest.\n"
"Use 0x notation and do the bitor in your head :-)\n",
0,
......
......@@ -17,6 +17,8 @@ varnish v1 -arg "-pthread_pools=1" -vcl+backend {
}
} -start
varnish v1 -cliok "param.set diag_bitmap 0x40000"
client c1 {
txreq -url "/bar"
rxresp
......@@ -38,8 +40,6 @@ client c1 {
expect resp.http.bar == "fOo"
} -run
client c1 -run
varnish v1 -cliok "debug.vmod"
varnish v1 -cliok "vcl.list"
......@@ -49,8 +49,6 @@ varnish v1 -cliok "vcl.discard vcl1"
varnish v1 -cliok "vcl.list"
varnish v1 -cliok "debug.vmod"
client c1 -run
varnish v1 -badvcl {
import std from "${topbuild}/lib/libvmod_std/.libs/libvmod_std.so.1" ;
import std from "${topbuild}/lib/libvmod_std/.libs/libvmod_std.so.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