[master] cdebe44a3 Revert "varnishlog: When writing binary logs, always include Begin/End/Link tags"

Geoff Simmons geoff at uplex.de
Fri Jan 25 11:42:07 UTC 2019


commit cdebe44a3cedb925a871ebda020c26438a6b7d60
Author: Geoff Simmons <geoff at uplex.de>
Date:   Fri Jan 25 12:31:37 2019 +0100

    Revert "varnishlog: When writing binary logs, always include Begin/End/Link tags"
    
    This reverts commit 1f32c1597a0927e3cd0f728069613e3377572a83.
    
    VUT_Arg('i') excludes all records with tags that are not explicitly
    marked as included, so this change had the effect that only records
    with Begin, End and Link, and any other tags that might be mentioned
    for inclusion, get written to binary logs. For u00006.vtc in
    particular, only those three record types were written to the log.
    
    What we need here is that the three record types are never excluded,
    in order to get transaction grouping right for reads from binary logs.

diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c
index b6a76d7df..09f8983d5 100644
--- a/bin/varnishlog/varnishlog.c
+++ b/bin/varnishlog/varnishlog.c
@@ -142,15 +142,10 @@ main(int argc, char * const *argv)
 		VUT_Error(vut, 1, "Missing -w option");
 
 	/* Setup output */
-	if (LOG.A_opt || !LOG.w_arg) {
+	if (LOG.A_opt || !LOG.w_arg)
 		vut->dispatch_f = VSL_PrintTransactions;
-	} else {
+	else
 		vut->dispatch_f = VSL_WriteTransactions;
-		// inefficient but not crossing API layers
-		AN(VUT_Arg(vut, 'i', "Link"));
-		AN(VUT_Arg(vut, 'i', "Begin"));
-		AN(VUT_Arg(vut, 'i', "End"));
-	}
 	if (LOG.w_arg) {
 		openout(LOG.a_opt);
 		AN(LOG.fo);


More information about the varnish-commit mailing list