[master] 238d27c Only commit once, at the end of transaction

Martin Blix Grydeland martin at varnish-software.com
Tue Feb 25 15:58:39 CET 2014


commit 238d27c571c744f4f7a2c832c04d757d34f57a4f
Author: Guillaume Quintard <guillaume.quintard at gmail.com>
Date:   Thu Feb 6 17:03:35 2014 +0100

    Only commit once, at the end of transaction

diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 3845db3..92aa3f4 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -209,6 +209,8 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
 				assert(i == 1);
 			} else if (tag == SLT_Hit)
 				hit = 1;
+			if (tag != SLT_ReqEnd && value == -1)
+				continue;
 
 			/* select bucket */
 			i = HIST_RES * (log(value) / log_ten);



More information about the varnish-commit mailing list