[master] 626ddb029 Retire SLT_BackendStart
Nils Goroll
nils.goroll at uplex.de
Mon Apr 15 15:57:06 UTC 2019
commit 626ddb029256513b6de36d5e642299d6708d638d
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Apr 15 17:54:26 2019 +0200
Retire SLT_BackendStart
Closes #2971
diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index d5f5bb2ee..da1b7f8ed 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -238,7 +238,6 @@ vbe_dir_gethdrs(VRT_CTX, VCL_BACKEND d)
struct pfd *pfd;
struct busyobj *bo;
struct worker *wrk;
- char abuf[VTCP_ADDRBUFSIZE], pbuf[VTCP_PORTBUFSIZE];
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
@@ -264,9 +263,8 @@ vbe_dir_gethdrs(VRT_CTX, VCL_BACKEND d)
if (PFD_State(pfd) != PFD_STATE_STOLEN)
extrachance = 0;
- PFD_RemoteName(pfd, abuf, sizeof abuf, pbuf, sizeof pbuf);
i = V1F_SendReq(wrk, bo, &bo->acct.bereq_hdrbytes,
- &bo->acct.bereq_bodybytes, 0, abuf, pbuf);
+ &bo->acct.bereq_bodybytes, 0);
if (PFD_State(pfd) != PFD_STATE_USED) {
if (VTP_Wait(wrk, pfd, VTIM_real() +
@@ -330,7 +328,6 @@ vbe_dir_http1pipe(VRT_CTX, VCL_BACKEND d)
struct backend *bp;
struct v1p_acct v1a;
struct pfd *pfd;
- char abuf[VTCP_ADDRBUFSIZE], pbuf[VTCP_PORTBUFSIZE];
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
@@ -352,9 +349,8 @@ vbe_dir_http1pipe(VRT_CTX, VCL_BACKEND d)
retval = SC_TX_ERROR;
} else {
CHECK_OBJ_NOTNULL(ctx->bo->htc, HTTP_CONN_MAGIC);
- PFD_RemoteName(pfd, abuf, sizeof abuf, pbuf, sizeof pbuf);
i = V1F_SendReq(ctx->req->wrk, ctx->bo,
- &v1a.bereq, &v1a.out, 1, abuf, pbuf);
+ &v1a.bereq, &v1a.out, 1);
VSLb_ts_req(ctx->req, "Pipe", W_TIM_real(ctx->req->wrk));
if (i == 0)
V1P_Process(ctx->req, *PFD_Fd(pfd), &v1a);
diff --git a/bin/varnishd/http1/cache_http1.h b/bin/varnishd/http1/cache_http1.h
index f642046cf..0bc52606c 100644
--- a/bin/varnishd/http1/cache_http1.h
+++ b/bin/varnishd/http1/cache_http1.h
@@ -31,7 +31,7 @@ struct VSC_vbe;
/* cache_http1_fetch.c [V1F] */
int V1F_SendReq(struct worker *, struct busyobj *, uint64_t *ctr_hdrbytes,
- uint64_t *ctr_bodybytes, int onlycached, char *addr, char *port);
+ uint64_t *ctr_bodybytes, int onlycached);
int V1F_FetchRespHdr(struct busyobj *);
int V1F_Setup_Fetch(struct vfp_ctx *vfc, struct http_conn *htc);
diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index f4ee4ebf0..d8ce8a1a6 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -69,7 +69,7 @@ vbf_iter_req_body(void *priv, unsigned flush, const void *ptr, ssize_t l)
int
V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes,
- uint64_t *ctr_bodybytes, int onlycached, char *abuf, char *pbuf)
+ uint64_t *ctr_bodybytes, int onlycached)
{
struct http *hp;
int j;
@@ -95,8 +95,6 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes,
do_chunked = 1;
}
- VSLb(bo->vsl, SLT_BackendStart, "%s %s", abuf, pbuf);
-
VTCP_blocking(*htc->rfd); /* XXX: we should timeout instead */
V1L_Open(wrk, wrk->aws, htc->rfd, bo->vsl, bo->t_prev, 0);
hdrbytes = HTTP1_Write(wrk, hp, HTTP1_Req);
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index ca470e2a4..c17548809 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -919,9 +919,9 @@ dispatch_f(struct VSL_data *vsl, struct VSL_transaction * const pt[],
4, &CTX.frag[F_O],
0, NULL);
break;
- case (SLT_BackendStart + BACKEND_MARKER):
+ case (SLT_BackendOpen + BACKEND_MARKER):
frag_fields(1, b, e,
- 1, &CTX.frag[F_h],
+ 3, &CTX.frag[F_h],
0, NULL);
break;
case SLT_ReqStart:
diff --git a/bin/varnishtest/tests/b00060.vtc b/bin/varnishtest/tests/b00060.vtc
index be6a10634..959e765d6 100644
--- a/bin/varnishtest/tests/b00060.vtc
+++ b/bin/varnishtest/tests/b00060.vtc
@@ -25,5 +25,4 @@ logexpect l2 -v v1 -d 1 -g vxid {
logexpect l3 -v v1 -d 1 -g vxid {
expect * * Begin ^bereq
expect * = BackendOpen "0.0.0.0 0 0.0.0.0 0$"
- expect * = BackendStart "^0.0.0.0 0$"
} -run
diff --git a/bin/varnishtest/tests/u00010.vtc b/bin/varnishtest/tests/u00010.vtc
index 329f92567..dd37a15d0 100644
--- a/bin/varnishtest/tests/u00010.vtc
+++ b/bin/varnishtest/tests/u00010.vtc
@@ -20,7 +20,7 @@ client c1 {
varnish v1 -vsl_catchup
-process p1 -expect-text 1 1 {list length 65}
+process p1 -expect-text 1 1 {list length 64}
process p1 -writehex 0c
diff --git a/bin/varnishtest/tests/u00013.vtc b/bin/varnishtest/tests/u00013.vtc
index 133d9992a..10fdd5523 100644
--- a/bin/varnishtest/tests/u00013.vtc
+++ b/bin/varnishtest/tests/u00013.vtc
@@ -1,6 +1,6 @@
varnishtest "varnishncsa outputs when UDS addresses are in use"
-# The %h formatter gets its value from ReqStart or BackendStart,
+# The %h formatter gets its value from ReqStart or BackendOpen,
# which now may be a UDS address.
# For UDS backends without a .host_header spec, the Host header is
diff --git a/doc/changes.rst b/doc/changes.rst
index 294fb8e80..8f8e52139 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -43,6 +43,9 @@ NEXT (2019-09-15)
/ ``keep = 5s`` avoid hammering on failing backends
(note this is existing behavior).
+* Retired the ``BackendStart`` log tag - ``BackendOpen`` contains all
+ the information from it
+
C APIs (for vmod and utility authors)
-------------------------------------
diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 03488cdc8..434419409 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -592,16 +592,11 @@ SLTM(Witness, 0, "Lock order witness records",
"Diagnostic recording of locking order.\n"
)
-SLTM(BackendStart, 0, "Backend request start",
- "Start of backend processing. Logs the backend IP address and port"
- " number.\n\n"
- "The format is::\n\n"
- "\t%s %s\n"
- "\t| |\n"
- "\t| +- Backend Port number\n"
- "\t+---- Backend IP4/6 address\n"
- "\n"
-)
+/*
+ * REL_20190915 remove after VSLng
+ * kept for now for VSL binary compatibility
+ */
+SLTM(BackendStart, 0, "(retired)", "")
SLTM(H2RxHdr, SLT_F_BINARY, "Received HTTP2 frame header",
"Binary data"
More information about the varnish-commit
mailing list