[master] 9bf8e871f Log using SLT_Notice on condfetch streaming delay

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Dec 20 11:21:07 UTC 2019


commit 9bf8e871ff4232e6fce6578d53e3aac0f8ffd3c4
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Mon Nov 25 12:01:42 2019 +0100

    Log using SLT_Notice on condfetch streaming delay
    
    Log a notice message when delaying a conditional fetch and the stale
    template object is still streaming.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 3a1b91563..4eaa36a10 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -702,6 +702,8 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
 		 * single slow body fetch. Second it makes sure that all
 		 * the object attributes are complete when we copy them
 		 * (this would be an issue for ie OA_GZIPBITS). */
+		VSLb(bo->vsl, SLT_Notice,
+		    "[core] Conditional fetch wait for streaming object");
 		ObjWaitState(bo->stale_oc, BOS_FINISHED);
 		stale_state = stale_boc->state;
 		HSH_DerefBoc(bo->wrk, bo->stale_oc);
diff --git a/doc/sphinx/reference/vsl.rst b/doc/sphinx/reference/vsl.rst
index 7ea7860e3..71a3110b4 100644
--- a/doc/sphinx/reference/vsl.rst
+++ b/doc/sphinx/reference/vsl.rst
@@ -112,6 +112,15 @@ for core Varnish generated messages, or with [<VMOD name>] for VMOD
 generated messages. The [core] messages are described in detail below, see
 the individual VMOD documentation for messages from VMODs.
 
+[core] Conditional fetch wait for streaming object
+	The backend answered 304 Not Modified on a conditional fetch using
+	an object that has not yet been fully fetched as the stale
+	template object. This can only happen when the TTL of the object
+	is less than the time it takes to fetch it. The fetch is halted
+	until the stale object is fully fetched, upon which the new object
+	is created as normal. While waiting, any grace time on the stale
+	object will be in effect.
+
 
 HISTORY
 =======


More information about the varnish-commit mailing list