Commit 025f1a61 authored by AlveElde's avatar AlveElde Committed by Dridi Boukelmoune

fetch: Log bgfetch_no_thread event

parent 2a84483f
......@@ -1222,6 +1222,8 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
if (Pool_Task(wrk->pool, bo->fetch_task, prio)) {
wrk->stats->bgfetch_no_thread++;
VSLb(bo->vsl, SLT_FetchError,
"No thread available for bgfetch");
(void)vbf_stp_fail(req->wrk, bo);
if (bo->stale_oc != NULL)
(void)HSH_DerefObjCore(wrk, &bo->stale_oc, 0);
......
......@@ -15,6 +15,10 @@ varnish v1 -vcl+backend {
}
} -start
logexpect l1 -v v1 {
expect * * FetchError "No thread available for bgfetch"
} -start
client c1 {
txreq
rxresp
......@@ -29,4 +33,6 @@ client c1 {
expect resp.status == 200
} -start
logexpect l1 -wait
varnish v1 -expect MAIN.bgfetch_no_thread == 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