r4630 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Thu Mar 18 11:13:34 CET 2010


Author: phk
Date: 2010-03-18 11:13:34 +0100 (Thu, 18 Mar 2010)
New Revision: 4630

Modified:
   trunk/varnish-cache/bin/varnishd/cache_backend.c
Log:
Force a WSL_Flush() to make sure the shmrecords pertaining to a reused
backend connection are chronological in the shmlog.



Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c	2010-03-18 08:21:49 UTC (rev 4629)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c	2010-03-18 10:13:34 UTC (rev 4630)
@@ -407,6 +407,11 @@
 	bp = sp->vbe->backend;
 
 	WSL(sp->wrk, SLT_BackendReuse, sp->vbe->fd, "%s", bp->vcl_name);
+	/*
+	 * Flush the shmlog, so that another session reusing this backend
+	 * will log chronologically later than our use of it.
+	 */
+	WSL_Flush(sp->wrk, 0);
 	Lck_Lock(&bp->mtx);
 	VSL_stats->backend_recycle++;
 	VTAILQ_INSERT_HEAD(&bp->connlist, sp->vbe, list);




More information about the varnish-commit mailing list