[3.0] 5306100 Reintroduce ExpKill VSL records.

Tollef Fog Heen tfheen at varnish-cache.org
Tue Aug 30 10:31:41 CEST 2011


commit 53061001cd0a05e526ad137e0499792aef8a0b74
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Aug 30 07:37:06 2011 +0000

    Reintroduce ExpKill VSL records.
    
    Fixes		#946
    
    Patch by	scoof

diff --git a/bin/varnishd/cache_expire.c b/bin/varnishd/cache_expire.c
index b32d22b..a07ab6d 100644
--- a/bin/varnishd/cache_expire.c
+++ b/bin/varnishd/cache_expire.c
@@ -338,6 +338,7 @@ exp_timer(struct sess *sp, void *priv)
 	struct objcore *oc;
 	struct lru *lru;
 	double t;
+	struct object *o;
 
 	(void)priv;
 	t = TIM_real();
@@ -401,6 +402,9 @@ exp_timer(struct sess *sp, void *priv)
 		VSC_C_main->n_expired++;
 
 		CHECK_OBJ_NOTNULL(oc->objhead, OBJHEAD_MAGIC);
+		o = oc_getobj(sp->wrk, oc);
+		WSL(sp->wrk, SLT_ExpKill, 0, "%u %.0f",
+		    o->xid, EXP_Ttl(NULL, o) - t);
 		(void)HSH_Deref(sp->wrk, oc, NULL);
 	}
 	NEEDLESS_RETURN(NULL);



More information about the varnish-commit mailing list