[4.0] 8ae27a9 Add Begin and Link VSL records for piped requests.

Lasse Karstensen lkarsten at varnish-software.com
Tue Jun 24 11:31:57 CEST 2014


commit 8ae27a9c73bbbd7ef360a5c241cf98d69dbd89a5
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date:   Mon Jun 23 15:43:28 2014 +0200

    Add Begin and Link VSL records for piped requests.
    
    This allows varnishlog and the other tools to group it automatically
    with the client request.

diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index c586ca4..401ebf1 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -593,6 +593,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
 	wrk->stats.s_pipe++;
 	bo = VBO_GetBusyObj(wrk, req);
 	HTTP_Setup(bo->bereq, bo->ws, bo->vsl, SLT_BereqMethod);
+	VSLb(bo->vsl, SLT_Begin, "bereq %u pipe", req->vsl->wid & VSL_IDENTMASK);
 	http_FilterReq(bo->bereq, req->http, 0);	// XXX: 0 ?
 	http_PrintfHeader(bo->bereq,
 	    "X-Varnish: %u", req->vsl->wid & VSL_IDENTMASK);
@@ -604,6 +605,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
 		INCOMPL();
 	assert(wrk->handling == VCL_RET_PIPE);
 
+	VSLb(req->vsl, SLT_Link, "bereq %u pipe", bo->vsl->wid & VSL_IDENTMASK);
 	PipeRequest(req, bo);
 	assert(WRW_IsReleased(wrk));
 	http_Teardown(bo->bereq);
diff --git a/include/vapi/vsl.h b/include/vapi/vsl.h
index a6e0839..45c1aaf 100644
--- a/include/vapi/vsl.h
+++ b/include/vapi/vsl.h
@@ -103,6 +103,7 @@ enum VSL_reason_e {
 	VSL_r_pass,
 	VSL_r_fetch,
 	VSL_r_bgfetch,
+	VSL_r_pipe,
 	VSL_r__MAX,
 };
 
diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index 0502c36..7f393b3 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -65,6 +65,7 @@ static const char * const vsl_r_names[VSL_r__MAX] = {
 	[VSL_r_pass]	= "pass",
 	[VSL_r_fetch]	= "fetch",
 	[VSL_r_bgfetch]	= "bgfetch",
+	[VSL_r_pipe]	= "pipe",
 };
 
 struct vtx;



More information about the varnish-commit mailing list