[master] 86b11dd Have SLT_Fetch_Body report if we're streaming or not.

Poul-Henning Kamp phk at FreeBSD.org
Wed Mar 12 13:44:54 CET 2014


commit 86b11dd76e3e984d1574dce0523e4ef3b970858f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Mar 12 12:44:39 2014 +0000

    Have SLT_Fetch_Body report if we're streaming or not.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 1172a61..74724e0 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -480,10 +480,13 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
 
 	if (bo->do_stream) {
 		HSH_Unbusy(&wrk->stats, obj->objcore);
-		VSLb(bo->vsl, SLT_Debug, "Allow streaming");
 		VBO_setstate(bo, BOS_STREAM);
 	}
 
+	VSLb(bo->vsl, SLT_Fetch_Body, "%u %s %s",
+	    bo->htc.body_status, body_status_2str(bo->htc.body_status),
+	    bo->do_stream ? "stream" : "-");
+
 	if (bo->htc.body_status != BS_NONE) {
 		assert(bo->htc.body_status  != BS_ERROR);
 		VFP_Fetch_Body(bo, est);
@@ -491,9 +494,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
 
 	bo->t_body = VTIM_mono();
 
-	VSLb(bo->vsl, SLT_Fetch_Body, "%u(%s)",
-	    bo->htc.body_status, body_status_2str(bo->htc.body_status));
-
 	if (bo->failed) {
 		wrk->stats.fetch_failed++;
 	} else {
diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 5dee431..9217582 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -255,13 +255,13 @@ SLTM(TTL, 0, "TTL set on object",
 )
 
 SLTM(Fetch_Body, 0, "Body fetched from backend",
-	"Finished fetching body from backend.\n\n"
+	"Ready to fetch body from backend.\n\n"
 	"The format is::\n\n"
-	"\t%d(%s) cls %d\n"
-	"\t|  |       |\n"
-	"\t|  |       +- 1 if the backend connection was closed\n"
-	"\t|  +--------- Text description of body status\n"
-	"\t+------------ Body status\n"
+	"\t%d (%s) %s\n"
+	"\t|   |    |\n"
+	"\t|   |    +---- 'stream' or '-'\n"
+	"\t|   +--------- Text description of body fetch mode\n"
+	"\t+------------- Body fetch mode\n"
 	"\n"
 )
 



More information about the varnish-commit mailing list