[master] f43b83c49 ban_lurker: Push stats when pacing

Nils Goroll nils.goroll at uplex.de
Sat May 3 12:23:07 UTC 2025


commit f43b83c492a8c76bc5526f1bdc52fc6bedcaf2ab
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Sat May 3 14:16:32 2025 +0200

    ban_lurker: Push stats when pacing
    
    When the ban lurker was busy with a long ban list, it did not update statistics
    in potentially a very long time, which could lead to irritating statistics
    values.
    
    We now try to update the stats when we pace the ban lurker anyway. The update
    already happens unconditionally when the ban lurker runs dry.

diff --git a/bin/varnishd/cache/cache_ban_lurker.c b/bin/varnishd/cache/cache_ban_lurker.c
index 17087a8e2..3057312c0 100644
--- a/bin/varnishd/cache/cache_ban_lurker.c
+++ b/bin/varnishd/cache/cache_ban_lurker.c
@@ -255,6 +255,7 @@ ban_lurker_test_ban(struct worker *wrk, struct ban *bt,
 
 	while (1) {
 		if (++ban_batch > cache_param->ban_lurker_batch) {
+			(void)Pool_TrySumstat(wrk);
 			VTIM_sleep(cache_param->ban_lurker_sleep);
 			ban_batch = 0;
 		}


More information about the varnish-commit mailing list