Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
a0e3078f
Commit
a0e3078f
authored
May 04, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Go over prepresp and remove a suboptimal optimization for len=0 objects.
parent
31ffe7cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
cache_center.c
bin/varnishd/cache/cache_center.c
+16
-20
No files found.
bin/varnishd/cache/cache_center.c
View file @
a0e3078f
...
...
@@ -184,7 +184,8 @@ cnt_wait(struct sess *sp, struct worker *wrk, struct req *req)
}
/*--------------------------------------------------------------------
* We have a refcounted object on the session, now deliver it.
* We have a refcounted object on the session, and possibly the busyobj
* which is fetching it, prepare a response.
*
DOT subgraph xcluster_prepresp {
DOT prepresp [
...
...
@@ -212,21 +213,22 @@ cnt_prepresp(struct sess *sp, struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL
(
req
->
obj
,
OBJECT_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
vcl
,
VCL_CONF_MAGIC
);
if
(
bo
!=
NULL
)
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
req
->
res_mode
=
0
;
if
(
bo
==
NULL
)
req
->
res_mode
|=
RES_LEN
;
if
(
bo
==
NULL
&&
!
req
->
disable_esi
&&
req
->
obj
->
esidata
!=
NULL
)
{
/* In ESI mode, we don't know the aggregate length */
if
(
bo
==
NULL
)
{
if
(
!
req
->
disable_esi
&&
req
->
obj
->
esidata
!=
NULL
)
{
/* In ESI mode, we can't know the aggregate length */
req
->
res_mode
&=
~
RES_LEN
;
req
->
res_mode
|=
RES_ESI
;
}
else
{
req
->
res_mode
|=
RES_LEN
;
}
}
else
{
AZ
(
bo
->
do_esi
);
}
if
(
req
->
esi_level
>
0
)
{
/* Included ESI object, always CHUNKED or EOF */
req
->
res_mode
&=
~
RES_LEN
;
req
->
res_mode
|=
RES_ESI_CHILD
;
}
...
...
@@ -242,14 +244,8 @@ cnt_prepresp(struct sess *sp, struct worker *wrk, struct req *req)
}
if
(
!
(
req
->
res_mode
&
(
RES_LEN
|
RES_CHUNKED
|
RES_EOF
)))
{
if
(
req
->
obj
->
len
==
0
&&
(
bo
==
NULL
||
!
bo
->
do_stream
))
/*
* If the object is empty, neither ESI nor GUNZIP
* can make it any different size
*/
req
->
res_mode
|=
RES_LEN
;
else
if
(
!
req
->
wantbody
)
{
/* We havn't chosen yet, do so */
if
(
!
req
->
wantbody
)
{
/* Nothing */
}
else
if
(
req
->
http
->
protover
>=
11
)
{
req
->
res_mode
|=
RES_CHUNKED
;
...
...
@@ -901,7 +897,7 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
if
(
req
->
obj
->
objcore
!=
NULL
)
HSH_Ref
(
req
->
obj
->
objcore
);
if
(
bo
->
state
>
BOS_FAIL
ED
)
{
if
(
bo
->
state
==
BOS_FINISH
ED
)
{
VBO_DerefBusyObj
(
wrk
,
&
req
->
busyobj
);
}
else
if
(
bo
->
state
==
BOS_FAILED
)
{
/* handle early failures */
...
...
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