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
0041032c
Commit
0041032c
authored
Mar 12, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let the body-fetching thread Unbusy the object.
parent
cf81441e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
cache_center.c
bin/varnishd/cache/cache_center.c
+0
-7
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+12
-1
No files found.
bin/varnishd/cache/cache_center.c
View file @
0041032c
...
...
@@ -929,13 +929,6 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
return
(
0
);
}
if
(
req
->
obj
->
objcore
!=
NULL
)
{
EXP_Insert
(
req
->
obj
);
AN
(
req
->
obj
->
objcore
);
AN
(
req
->
obj
->
objcore
->
ban
);
AZ
(
req
->
obj
->
ws_o
->
overflow
);
HSH_Unbusy
(
&
wrk
->
stats
,
req
->
obj
->
objcore
);
}
VBO_DerefBusyObj
(
wrk
,
&
req
->
busyobj
);
wrk
->
acct_tmp
.
fetch
++
;
sp
->
step
=
STP_PREPRESP
;
...
...
bin/varnishd/cache/cache_fetch.c
View file @
0041032c
...
...
@@ -35,6 +35,8 @@
#include "cache.h"
#include "hash/hash_slinger.h"
#include "cache_backend.h"
#include "vcli_priv.h"
#include "vct.h"
...
...
@@ -674,13 +676,22 @@ FetchBody(struct worker *wrk, void *priv)
"Content-Length: %zd"
,
obj
->
len
);
}
bo
->
state
=
BOS_FINISHED
;
if
(
cls
)
VDI_CloseFd
(
&
bo
->
vbc
);
else
VDI_RecycleFd
(
&
bo
->
vbc
);
if
(
obj
->
objcore
!=
NULL
)
{
EXP_Insert
(
obj
);
AN
(
obj
->
objcore
->
ban
);
AZ
(
obj
->
ws_o
->
overflow
);
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
}
/* XXX: Atomic assignment, needs volatile/membar ? */
bo
->
state
=
BOS_FINISHED
;
}
bo
->
stats
=
NULL
;
VBO_DerefBusyObj
(
wrk
,
&
bo
);
...
...
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