r5161 - branches/2.1/varnish-cache/bin/varnishd
    martin at varnish-cache.org 
    martin at varnish-cache.org
       
    Tue Aug 31 09:53:49 CEST 2010
    
    
  
Author: martin
Date: 2010-08-31 09:53:49 +0200 (Tue, 31 Aug 2010)
New Revision: 5161
Modified:
   branches/2.1/varnish-cache/bin/varnishd/cache_backend.c
Log:
Add explicit log flushing when backend connections close to keep log
chronology. This is to avoid log lines for the same (reused) FD coming 
before the closing connection when load is high.
Trunk r5160 reworked for 2.1 branch.
Modified: branches/2.1/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- branches/2.1/varnish-cache/bin/varnishd/cache_backend.c	2010-08-31 07:45:29 UTC (rev 5160)
+++ branches/2.1/varnish-cache/bin/varnishd/cache_backend.c	2010-08-31 07:53:49 UTC (rev 5161)
@@ -386,6 +386,11 @@
 	bp = sp->vbe->backend;
 
 	WSL(sp->wrk, SLT_BackendClose, sp->vbe->fd, "%s", bp->vcl_name);
+
+	/* Checkpoint log to flush all info related to this connection
+	   before the OS reuses the FD */
+	WSL_Flush(sp->wrk, 0);
+
 	TCP_close(&sp->vbe->fd);
 	VBE_DropRefConn(bp);
 	sp->vbe->backend = NULL;
    
    
More information about the varnish-commit
mailing list