[master] 9ab876d7e Special case late pool stats push also for DBG_VCLREL

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jan 11 17:06:07 UTC 2021


commit 9ab876d7ead322d3acffe3af9fdeb5a80512375d
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Tue May 19 12:54:13 2020 +0200

    Special case late pool stats push also for DBG_VCLREL
    
    If the DBG_VCLREL is in effect and there are unpushed pool stats, make
    sure that some thread is waking up to perform the late push. This should
    help with stability for VTC test cases using the DBG_VCLREL flag.

diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index b7b31296c..ee0185146 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -389,7 +389,17 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk)
 			pp->nidle++;
 			do {
 				// see signaling_note at the top for explanation
-				if (wrk->vcl == NULL)
+				if (DO_DEBUG(DBG_VCLREL) &&
+				    pp->b_stat == NULL && pp->a_stat->summs)
+					/* We've released the VCL, but
+					 * there are pool stats not pushed
+					 * to the global stats and some
+					 * thread is busy pushing
+					 * stats. Set a 1 second timeout
+					 * so that we'll wake up and get a
+					 * chance to push stats. */
+					tmo = wrk->lastused + 1.;
+				else if (wrk->vcl == NULL)
 					tmo = 0;
 				else if (DO_DEBUG(DBG_VTC_MODE))
 					tmo =  wrk->lastused+1.;


More information about the varnish-commit mailing list