r266 - in trunk/varnish-cache: bin/varnishd include
phk at projects.linpro.no
phk at projects.linpro.no
Thu Jun 29 16:37:15 CEST 2006
Author: phk
Date: 2006-06-29 16:37:15 +0200 (Thu, 29 Jun 2006)
New Revision: 266
Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_expire.c
trunk/varnish-cache/bin/varnishd/cache_fetch.c
trunk/varnish-cache/include/shmlog_tags.h
Log:
Tag objects with their origin session xid and log it when we clean up.
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2006-06-29 13:04:55 UTC (rev 265)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2006-06-29 14:37:15 UTC (rev 266)
@@ -65,6 +65,7 @@
struct object {
unsigned refcnt;
+ unsigned xid;
struct objhead *objhead;
pthread_cond_t cv;
Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-06-29 13:04:55 UTC (rev 265)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-06-29 14:37:15 UTC (rev 266)
@@ -52,6 +52,7 @@
}
TAILQ_REMOVE(&exp_deathrow, o, deathrow);
AZ(pthread_mutex_unlock(&exp_mtx));
+ VSL(SLT_ExpKill, 0, "%u", o->xid);
HSH_Deref(o);
}
}
@@ -83,6 +84,7 @@
}
binheap_delete(exp_heap, 0);
AZ(pthread_mutex_unlock(&exp_mtx));
+ VSL(SLT_ExpPick, 0, "%u", o->xid);
sp.vcl = GetVCL();
sp.obj = o;
Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-06-29 13:04:55 UTC (rev 265)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-06-29 14:37:15 UTC (rev 266)
@@ -245,6 +245,8 @@
time_t t_req, t_resp;
int body;
+ sp->obj->xid = sp->xid;
+
fd = VBE_GetFd(sp->backend, &fd_token, sp->xid);
assert(fd != -1);
VSL(SLT_Backend, sp->fd, "%d %s", fd, sp->backend->vcl_name);
Modified: trunk/varnish-cache/include/shmlog_tags.h
===================================================================
--- trunk/varnish-cache/include/shmlog_tags.h 2006-06-29 13:04:55 UTC (rev 265)
+++ trunk/varnish-cache/include/shmlog_tags.h 2006-06-29 14:37:15 UTC (rev 266)
@@ -34,3 +34,5 @@
SLTM(LostHeader)
SLTM(VCL)
SLTM(XID)
+SLTM(ExpPick)
+SLTM(ExpKill)
More information about the varnish-commit
mailing list