[master] a916637 Get a new bereq XID if we retry a fetch
Poul-Henning Kamp
phk at FreeBSD.org
Thu Jan 16 16:38:49 CET 2014
commit a91663748a430bba4365aa7fb8f18680b02dea27
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Jan 16 15:38:27 2014 +0000
Get a new bereq XID if we retry a fetch
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index af4d286..1bdca51 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -157,6 +157,7 @@ static enum fetch_step
vbf_stp_fetchhdr(struct worker *wrk, struct busyobj *bo)
{
int i, do_ims;
+ unsigned owid, wid;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
@@ -240,6 +241,14 @@ vbf_stp_fetchhdr(struct worker *wrk, struct busyobj *bo)
if (wrk->handling == VCL_RET_RETRY) {
bo->retries++;
if (bo->retries <= cache_param->max_retries) {
+ // XXX: BereqEnd + BereqAcct ?
+ wid = VXID_Get(&wrk->vxid_pool);
+ VSLb(bo->vsl, SLT_Link, "bereq %u retry", wid);
+ VSLb(bo->vsl, SLT_End, "%s", "");
+ VSL_Flush(bo->vsl, 0);
+ owid = bo->vsl->wid & VSL_IDENTMASK;
+ bo->vsl->wid = wid | VSL_BACKENDMARKER;
+ VSLb(bo->vsl, SLT_Begin, "bereq %u retry", owid);
VDI_CloseFd(&bo->vbc);
return (F_STP_STARTFETCH);
}
More information about the varnish-commit
mailing list