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
99a40f5a
Commit
99a40f5a
authored
Jan 21, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only ref the busy boc if it is not yet BOS_FINISHED
parent
0375791c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
23 deletions
+10
-23
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-1
cache_hash.c
bin/varnishd/cache/cache_hash.c
+3
-3
cache_obj.c
bin/varnishd/cache/cache_obj.c
+2
-0
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+4
-19
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
99a40f5a
...
...
@@ -866,7 +866,7 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
*/
static
enum
fetch_step
vbf_stp_fail
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
)
vbf_stp_fail
(
struct
worker
*
wrk
,
const
struct
busyobj
*
bo
)
{
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
...
...
bin/varnishd/cache/cache_hash.c
View file @
99a40f5a
...
...
@@ -724,10 +724,10 @@ HSH_RefBusy(const struct objcore *oc)
assert
(
oc
->
refcnt
>
0
);
boc
=
oc
->
boc
;
CHECK_OBJ_ORNULL
(
boc
,
BOC_MAGIC
);
if
(
boc
!=
NULL
)
{
//CHECK_OBJ_NOTNULL(boc->busyobj, BUSYOBJ_MAGIC);
if
(
boc
!=
NULL
&&
boc
->
state
<
BOS_FINISHED
)
boc
->
refcount
++
;
}
else
boc
=
NULL
;
Lck_Unlock
(
&
oh
->
mtx
);
return
(
boc
);
}
...
...
bin/varnishd/cache/cache_obj.c
View file @
99a40f5a
...
...
@@ -217,6 +217,8 @@ ObjTrimStore(struct worker *wrk, struct objcore *oc)
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
assert
(
oc
->
boc
==
NULL
||
oc
->
boc
->
state
<
BOS_FINISHED
);
if
(
om
->
objtrimstore
!=
NULL
)
om
->
objtrimstore
(
wrk
,
oc
);
return
;
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
99a40f5a
...
...
@@ -198,35 +198,20 @@ cnt_deliver(struct worker *wrk, struct req *req)
/* Grab a ref to the bo if there is one, and hand it down */
boc
=
HSH_RefBusy
(
req
->
objcore
);
if
(
boc
!=
NULL
)
{
if
(
req
->
esi_level
==
0
&&
boc
->
state
==
BOS_FINISHED
)
{
HSH_DerefBusy
(
wrk
,
req
->
objcore
);
boc
=
NULL
;
}
else
if
(
!
boc
->
busyobj
->
do_stream
)
{
/* XXX These should go away */
xxxassert
(
boc
->
state
>=
BOS_STREAM
);
xxxassert
(
boc
->
state
>=
BOS_FINISHED
);
HSH_DerefBusy
(
wrk
,
req
->
objcore
);
boc
=
NULL
;
}
}
cnt_vdp
(
req
,
boc
);
/* pass+streaming, abandon fetch in case delivery terminated early */
if
(
boc
!=
NULL
&&
req
->
objcore
->
flags
&
OC_F_PASS
)
{
CHECK_OBJ_NOTNULL
(
boc
->
busyobj
,
BUSYOBJ_MAGIC
);
boc
->
busyobj
->
abandon
=
1
;
}
VSLb_ts_req
(
req
,
"Resp"
,
W_TIM_real
(
wrk
));
if
(
http_HdrIs
(
req
->
resp
,
H_Connection
,
"close"
))
req
->
doclose
=
SC_RESP_CLOSE
;
if
(
req
->
objcore
->
flags
&
(
OC_F_PRIVATE
|
OC_F_PASS
))
{
if
(
boc
!=
NULL
)
if
(
boc
!=
NULL
)
{
CHECK_OBJ_NOTNULL
(
boc
->
busyobj
,
BUSYOBJ_MAGIC
);
boc
->
busyobj
->
abandon
=
1
;
ObjWaitState
(
boc
,
BOS_FINISHED
);
}
ObjSlim
(
wrk
,
req
->
objcore
);
}
...
...
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