Mailing List Archive

[master] 495586aa2 vsl: Optional Begin[4] field for req sub-level
commit 495586aa235f17ea1c68488b32adf7cfb29b0010
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Fri Jul 22 14:46:52 2022 +0200

vsl: Optional Begin[4] field for req sub-level

Same thing for Link tags since they share the same parsing code.

diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 245fcd87c..33827b916 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -136,14 +136,16 @@ ved_include(struct req *preq, const char *src, const char *host,
AZ(req->vsl->wid);
req->vsl->wid = VXID_Get(wrk, VSL_CLIENTMARKER);

- VSLb(req->vsl, SLT_Begin, "req %u esi", VXID(preq->vsl->wid));
- VSLb(preq->vsl, SLT_Link, "req %u esi", VXID(req->vsl->wid));
-
- VSLb_ts_req(req, "Start", W_TIM_real(wrk));
-
wrk->stats->esi_req++;
req->esi_level = preq->esi_level + 1;

+ VSLb(req->vsl, SLT_Begin, "req %u esi %u", VXID(preq->vsl->wid),
+ req->esi_level);
+ VSLb(preq->vsl, SLT_Link, "req %u esi %u", VXID(req->vsl->wid),
+ req->esi_level);
+
+ VSLb_ts_req(req, "Start", W_TIM_real(wrk));
+
memset(req->top, 0, sizeof *req->top);
req->top = preq->top;

diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 47414b990..9e28d92e0 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -506,22 +506,24 @@ SLTM(Gzip, 0, "G(un)zip performed on object",
SLTM(Link, 0, "Links to a child VXID",
"Links this VXID to any child VXID it initiates.\n\n"
"The format is::\n\n"
- "\t%s %d %s\n"
- "\t| | |\n"
- "\t| | +- Reason\n"
- "\t| +---- Child vxid\n"
- "\t+------- Child type (\"req\" or \"bereq\")\n"
+ "\t%s %d %s [%u]\n"
+ "\t| | | |\n"
+ "\t| | | +- Child task sub-level\n"
+ "\t| | +----- Reason\n"
+ "\t| +-------- Child vxid\n"
+ "\t+----------- Child type (\"sess\", \"req\" or \"bereq\")\n"
"\n"
)

SLTM(Begin, 0, "Marks the start of a VXID",
"The first record of a VXID transaction.\n\n"
"The format is::\n\n"
- "\t%s %d %s\n"
- "\t| | |\n"
- "\t| | +- Reason\n"
- "\t| +---- Parent vxid\n"
- "\t+------- Type (\"sess\", \"req\" or \"bereq\")\n"
+ "\t%s %d %s [%u]\n"
+ "\t| | | |\n"
+ "\t| | | +- Task sub-level\n"
+ "\t| | +----- Reason\n"
+ "\t| +-------- Parent vxid\n"
+ "\t+----------- Type (\"sess\", \"req\" or \"bereq\")\n"
"\n"
)

_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit