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
8c8b5007
Commit
8c8b5007
authored
Feb 25, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop the BOS_COMMITTED state, and rename BOS_FETCHING to BOS_STREAM
which is really what client threads care about.
parent
6895fcb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
cache.h
bin/varnishd/cache/cache.h
+1
-2
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+12
-12
cache_fetch_proc.c
bin/varnishd/cache/cache_fetch_proc.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
8c8b5007
...
...
@@ -503,8 +503,7 @@ oc_getlru(const struct objcore *oc)
enum
busyobj_state_e
{
BOS_INVALID
=
0
,
/* don't touch (yet) */
BOS_REQ_DONE
,
/* beresp.* can be examined */
BOS_COMMITTED
,
/* beresp.* can be examined */
BOS_FETCHING
,
/* beresp.* can be examined */
BOS_STREAM
,
/* beresp.* can be examined */
BOS_FINISHED
,
/* object is complete */
BOS_FAILED
,
/* something went wrong */
};
...
...
bin/varnishd/cache/cache_fetch.c
View file @
8c8b5007
...
...
@@ -395,7 +395,6 @@ vbf_stp_fetchhdr(struct worker *wrk, struct busyobj *bo)
}
assert
(
bo
->
state
==
BOS_REQ_DONE
);
VBO_setstate
(
bo
,
BOS_COMMITTED
);
if
(
bo
->
do_esi
)
bo
->
do_stream
=
0
;
...
...
@@ -509,13 +508,13 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
assert
(
bo
->
refcount
>=
1
);
AZ
(
WS_Overflowed
(
bo
->
ws_o
));
if
(
bo
->
do_stream
)
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
if
(
bo
->
state
==
BOS_COMMITTED
)
VBO_setstate
(
bo
,
BOS_FETCHING
);
else
if
(
bo
->
state
!=
BOS_FAILED
)
WRONG
(
"Wrong bo->state"
);
assert
(
bo
->
state
==
BOS_REQ_DONE
);
if
(
bo
->
do_stream
)
{
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
VBO_setstate
(
bo
,
BOS_STREAM
);
}
if
(
bo
->
htc
.
body_status
!=
BS_NONE
)
{
assert
(
bo
->
htc
.
body_status
!=
BS_ERROR
);
...
...
@@ -530,7 +529,10 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
if
(
bo
->
state
==
BOS_FAILED
)
{
wrk
->
stats
.
fetch_failed
++
;
}
else
{
assert
(
bo
->
state
==
BOS_FETCHING
);
if
(
bo
->
do_stream
)
assert
(
bo
->
state
==
BOS_STREAM
);
else
assert
(
bo
->
state
==
BOS_REQ_DONE
);
VSLb
(
bo
->
vsl
,
SLT_Length
,
"%zd"
,
obj
->
len
);
...
...
@@ -622,7 +624,7 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
AZ
(
WS_Overflowed
(
bo
->
ws_o
));
VBO_setstate
(
bo
,
BOS_
FETCHING
);
VBO_setstate
(
bo
,
BOS_
STREAM
);
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
...
...
@@ -849,9 +851,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
if
(
mode
==
VBF_BACKGROUND
)
{
VBO_waitstate
(
bo
,
BOS_REQ_DONE
);
}
else
{
VBO_waitstate
(
bo
,
BOS_FETCHING
);
if
(
!
bo
->
do_stream
)
VBO_waitstate
(
bo
,
BOS_FINISHED
);
VBO_waitstate
(
bo
,
BOS_STREAM
);
assert
(
bo
->
state
!=
BOS_FAILED
||
(
oc
->
flags
&
OC_F_FAILED
));
}
VBO_DerefBusyObj
(
wrk
,
&
bo
);
...
...
bin/varnishd/cache/cache_fetch_proc.c
View file @
8c8b5007
...
...
@@ -61,7 +61,7 @@ VFP_Error(struct busyobj *bo, const char *fmt, ...)
va_list
ap
;
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
assert
(
bo
->
state
>=
BOS_
COMMITTED
);
assert
(
bo
->
state
>=
BOS_
REQ_DONE
);
if
(
bo
->
state
<
BOS_FAILED
)
{
va_start
(
ap
,
fmt
);
VSLbv
(
bo
->
vsl
,
SLT_FetchError
,
fmt
,
ap
);
...
...
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