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
f2227781
Commit
f2227781
authored
Apr 30, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate the prepfetch state
parent
ee1f86d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
40 deletions
+11
-40
cache_center.c
bin/varnishd/cache/cache_center.c
+11
-39
steps.h
include/tbl/steps.h
+0
-1
No files found.
bin/varnishd/cache/cache_center.c
View file @
f2227781
...
...
@@ -550,8 +550,8 @@ DOT shape=record
DOT label="{cnt_fetch:|fetch hdr\nfrom backend|(find obj.ttl)|{vcl_fetch\{\}|{req.|bereq.|beresp.}}|{<err>error?|<rst>restart?}}"
DOT ]
DOT }
DOT fetch ->
prepfetch
[style=bold,color=red]
DOT fetch ->
prepfetch
[style=bold,color=blue]
DOT fetch ->
fetchbody
[style=bold,color=red]
DOT fetch ->
fetchbody
[style=bold,color=blue]
*/
static
int
...
...
@@ -630,7 +630,7 @@ cnt_fetch(struct sess *sp, struct worker *wrk, struct req *req)
switch
(
req
->
handling
)
{
case
VCL_RET_DELIVER
:
sp
->
step
=
STP_
PREPFETCH
;
sp
->
step
=
STP_
FETCHBODY
;
return
(
0
);
default:
break
;
...
...
@@ -670,18 +670,17 @@ cnt_fetch(struct sess *sp, struct worker *wrk, struct req *req)
* Prepare to fetch body from backend
*
DOT subgraph xcluster_body {
DOT
prepfetch
[
DOT
fetchbody
[
DOT shape=record
DOT label="{cnt_
prepfetch:|error?|<out>stream ?
}"
DOT label="{cnt_
fetchbody:|start fetch_thread
}"
DOT ]
DOT }
DOT prepfetch:out -> fetchbody [style=bold,color=red]
DOT prepfetch:out -> fetchbody [style=bold,color=blue]
DOT prepfetch:out -> prepresp [label=yes,style=bold,color=cyan]
DOT fetchbody:out -> prepresp [style=bold,color=red]
DOT fetchbody:out -> prepresp [style=bold,color=blue]
*/
static
int
cnt_
prepfetch
(
struct
sess
*
sp
,
struct
worker
*
wrk
,
struct
req
*
req
)
cnt_
fetchbody
(
struct
sess
*
sp
,
struct
worker
*
wrk
,
struct
req
*
req
)
{
struct
http
*
hp
,
*
hp2
;
char
*
b
;
...
...
@@ -868,34 +867,9 @@ cnt_prepfetch(struct sess *sp, struct worker *wrk, struct req *req)
RFC2616_Do_Cond
(
sp
))
bo
->
do_stream
=
0
;
sp
->
step
=
STP_FETCHBODY
;
return
(
0
);
}
/*--------------------------------------------------------------------
* Actually fetch body from backend
*
DOT subgraph xcluster_fetchbody {
DOT fetchbody [
DOT shape=record
DOT label="{cnt_fetchbody:|error ?|<out>success ?}"
DOT ]
DOT }
DOT fetchbody:out -> prepresp [style=bold,color=red]
DOT fetchbody:out -> prepresp [style=bold,color=blue]
*/
static
int
cnt_fetchbody
(
struct
sess
*
sp
,
struct
worker
*
wrk
,
struct
req
*
req
)
{
struct
busyobj
*
bo
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
bo
=
req
->
busyobj
;
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
/*
* Ready to fetch the body
*/
bo
->
fetch_task
.
func
=
FetchBody
;
bo
->
fetch_task
.
priv
=
bo
;
...
...
@@ -1707,5 +1681,3 @@ CNT_Init(void)
xids
=
random
();
CLI_AddFuncs
(
debug_cmds
);
}
include/tbl/steps.h
View file @
f2227781
...
...
@@ -40,7 +40,6 @@ STEP(lookup, LOOKUP, (sp, sp->wrk, sp->req))
STEP
(
miss
,
MISS
,
(
sp
,
sp
->
wrk
,
sp
->
req
))
STEP
(
hit
,
HIT
,
(
sp
,
sp
->
wrk
,
sp
->
req
))
STEP
(
fetch
,
FETCH
,
(
sp
,
sp
->
wrk
,
sp
->
req
))
STEP
(
prepfetch
,
PREPFETCH
,
(
sp
,
sp
->
wrk
,
sp
->
req
))
STEP
(
fetchbody
,
FETCHBODY
,
(
sp
,
sp
->
wrk
,
sp
->
req
))
STEP
(
prepresp
,
PREPRESP
,
(
sp
,
sp
->
wrk
,
sp
->
req
))
STEP
(
deliver
,
DELIVER
,
(
sp
,
sp
->
wrk
,
sp
->
req
))
...
...
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