[7.0] 4f9785ec5 Do not select active VCL automatically in the child process
Nils Goroll
nils.goroll at uplex.de
Tue Nov 16 11:48:06 UTC 2021
commit 4f9785ec56c187eb62cc6bffad433da7a74d9f97
Author: AlveElde <alve_elde at hotmail.com>
Date: Wed Aug 25 17:38:47 2021 +0200
Do not select active VCL automatically in the child process
Do not select the first VCL present as the active VCL in the child
process. Instead it should always use what the mgt process tells it
through the explicit 'vcl.use' commands it will send.
Previously, the child could select a cold VCL as the active VCL if that
happened to be the first one present to it during restarts. This could
lead to asserts as that is not an allowed state.
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 0efded131..ac72ede22 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -707,10 +707,6 @@ vcl_load(struct cli *cli,
VCLI_Out(cli, "Loaded \"%s\" as \"%s\"", fn , name);
VTAILQ_INSERT_TAIL(&vcl_head, vcl, list);
- Lck_Lock(&vcl_mtx);
- if (vcl_active == NULL)
- vcl_active = vcl;
- Lck_Unlock(&vcl_mtx);
VSC_C_main->n_vcl++;
VSC_C_main->n_vcl_avail++;
}
More information about the varnish-commit
mailing list