Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
7ccd8e60
Commit
7ccd8e60
authored
Dec 13, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generally test on req-toppines rather than esi_level
parent
e259c586
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
14 deletions
+11
-14
cache.h
bin/varnishd/cache/cache.h
+2
-0
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-1
cache_req.c
bin/varnishd/cache/cache_req.c
+5
-10
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+2
-2
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
7ccd8e60
...
@@ -538,6 +538,8 @@ struct req {
...
@@ -538,6 +538,8 @@ struct req {
struct
vrt_privs
privs
[
1
];
struct
vrt_privs
privs
[
1
];
};
};
#define IS_TOPREQ(req) ((req)->top == NULL || (req)->top->topreq == (req))
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
* Struct sess is a high memory-load structure because sessions typically
* Struct sess is a high memory-load structure because sessions typically
* hang around the waiter for relatively long time.
* hang around the waiter for relatively long time.
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
7ccd8e60
...
@@ -256,7 +256,7 @@ ved_vdp_esi_init(struct req *req, void **priv)
...
@@ -256,7 +256,7 @@ ved_vdp_esi_init(struct req *req, void **priv)
*
priv
=
ecx
;
*
priv
=
ecx
;
RFC2616_Weaken_Etag
(
req
->
resp
);
RFC2616_Weaken_Etag
(
req
->
resp
);
if
(
req
->
esi_level
==
0
)
{
if
(
IS_TOPREQ
(
req
)
)
{
Req_MakeTop
(
req
);
Req_MakeTop
(
req
);
if
(
req
->
top
==
NULL
)
{
if
(
req
->
top
==
NULL
)
{
VSLb
(
req
->
vsl
,
SLT_Error
,
VSLb
(
req
->
vsl
,
SLT_Error
,
...
...
bin/varnishd/cache/cache_req.c
View file @
7ccd8e60
...
@@ -63,16 +63,11 @@ Req_AcctLogCharge(struct VSC_main_wrk *ds, struct req *req)
...
@@ -63,16 +63,11 @@ Req_AcctLogCharge(struct VSC_main_wrk *ds, struct req *req)
(
uintmax_t
)(
a
->
resp_hdrbytes
+
a
->
resp_bodybytes
));
(
uintmax_t
)(
a
->
resp_hdrbytes
+
a
->
resp_bodybytes
));
}
}
/*
if
(
IS_TOPREQ
(
req
))
{
* Charge to main byte counters, except for ESI subrequests
#define ACCT(foo) ds->s_##foo += a->foo;
* which are charged as they pass through the topreq.
* XXX: make this test req->top instead
*/
#define ACCT(foo) \
if (req->esi_level == 0) \
ds->s_##foo += a->foo; \
a->foo = 0;
#include "tbl/acct_fields_req.h"
#include "tbl/acct_fields_req.h"
}
memset
(
a
,
0
,
sizeof
*
a
);
}
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
...
@@ -216,7 +211,6 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
...
@@ -216,7 +211,6 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
req
->
director_hint
=
NULL
;
req
->
director_hint
=
NULL
;
req
->
restarts
=
0
;
req
->
restarts
=
0
;
req
->
top
=
0
;
AZ
(
req
->
privs
->
magic
);
AZ
(
req
->
privs
->
magic
);
...
@@ -244,6 +238,7 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
...
@@ -244,6 +238,7 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
req
->
hash_ignore_busy
=
0
;
req
->
hash_ignore_busy
=
0
;
req
->
esi_level
=
0
;
req
->
esi_level
=
0
;
req
->
is_hit
=
0
;
req
->
is_hit
=
0
;
req
->
top
=
0
;
if
(
WS_Overflowed
(
req
->
ws
))
if
(
WS_Overflowed
(
req
->
ws
))
wrk
->
stats
->
ws_client_overflow
++
;
wrk
->
stats
->
ws_client_overflow
++
;
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
7ccd8e60
...
@@ -182,7 +182,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
...
@@ -182,7 +182,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
assert
(
wrk
->
handling
==
VCL_RET_DELIVER
);
assert
(
wrk
->
handling
==
VCL_RET_DELIVER
);
if
(
req
->
esi_level
==
0
&&
if
(
IS_TOPREQ
(
req
)
&&
http_IsStatus
(
req
->
resp
,
200
)
&&
http_IsStatus
(
req
->
resp
,
200
)
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
req
))
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
req
))
http_PutResponse
(
req
->
resp
,
"HTTP/1.1"
,
304
,
NULL
);
http_PutResponse
(
req
->
resp
,
"HTTP/1.1"
,
304
,
NULL
);
...
@@ -917,7 +917,7 @@ cnt_recv(struct worker *wrk, struct req *req)
...
@@ -917,7 +917,7 @@ cnt_recv(struct worker *wrk, struct req *req)
req
->
req_step
=
R_STP_LOOKUP
;
req
->
req_step
=
R_STP_LOOKUP
;
break
;
break
;
case
VCL_RET_PIPE
:
case
VCL_RET_PIPE
:
if
(
req
->
esi_level
>
0
)
{
if
(
!
IS_TOPREQ
(
req
)
)
{
VSLb
(
req
->
vsl
,
SLT_VCL_Error
,
VSLb
(
req
->
vsl
,
SLT_VCL_Error
,
"vcl_recv{} returns pipe for ESI included object."
"vcl_recv{} returns pipe for ESI included object."
" Doing pass."
);
" Doing pass."
);
...
...
bin/varnishd/cache/cache_vrt_var.c
View file @
7ccd8e60
...
@@ -520,7 +520,7 @@ VRT_l_req_esi(VRT_CTX, VCL_BOOL process_esi)
...
@@ -520,7 +520,7 @@ VRT_l_req_esi(VRT_CTX, VCL_BOOL process_esi)
* Only allow you to turn of esi in the main request
* Only allow you to turn of esi in the main request
* else everything gets confused
* else everything gets confused
*/
*/
if
(
ctx
->
req
->
esi_level
==
0
)
if
(
IS_TOPREQ
(
ctx
->
req
)
)
ctx
->
req
->
disable_esi
=
!
process_esi
;
ctx
->
req
->
disable_esi
=
!
process_esi
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment