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
2f940fb9
Commit
2f940fb9
authored
Apr 06, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move esi-policy from hash-lookup to req-fsm
parent
010ef993
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
cache_hash.c
bin/varnishd/cache/cache_hash.c
+10
-6
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+1
-1
hash_slinger.h
bin/varnishd/hash/hash_slinger.h
+1
-1
No files found.
bin/varnishd/cache/cache_hash.c
View file @
2f940fb9
...
...
@@ -286,7 +286,7 @@ HSH_Insert(struct worker *wrk, const void *digest, struct objcore *oc)
*/
struct
objcore
*
HSH_Lookup
(
struct
req
*
req
)
HSH_Lookup
(
struct
req
*
req
,
int
wait_for_busy
)
{
struct
worker
*
wrk
;
struct
objhead
*
oh
;
...
...
@@ -309,7 +309,7 @@ HSH_Lookup(struct req *req)
if
(
req
->
hash_objhead
!=
NULL
)
{
/*
* This
sess came off the waiting list, and brings a
* This
req came off the waiting list, and brings an
* oh refcnt with it.
*/
CHECK_OBJ_NOTNULL
(
req
->
hash_objhead
,
OBJHEAD_MAGIC
);
...
...
@@ -409,7 +409,7 @@ HSH_Lookup(struct req *req)
if
(
busy_found
)
{
/* There are one or more busy objects, wait for them */
if
(
req
->
esi_level
==
0
)
{
if
(
wait_for_busy
)
{
CHECK_OBJ_NOTNULL
(
wrk
->
nwaitinglist
,
WAITINGLIST_MAGIC
);
if
(
oh
->
waitinglist
==
NULL
)
{
...
...
@@ -418,10 +418,14 @@ HSH_Lookup(struct req *req)
}
VTAILQ_INSERT_TAIL
(
&
oh
->
waitinglist
->
list
,
req
,
w_list
);
}
if
(
DO_DEBUG
(
DBG_WAITINGLIST
))
VSLb
(
req
->
vsl
,
SLT_Debug
,
"on waiting list <%p>"
,
oh
);
}
else
{
if
(
DO_DEBUG
(
DBG_WAITINGLIST
))
VSLb
(
req
->
vsl
,
SLT_Debug
,
"hit busy obj <%p>"
,
oh
);
}
wrk
->
stats
.
busy_sleep
++
;
SES_Charge
(
req
->
wrk
,
req
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
2f940fb9
...
...
@@ -751,7 +751,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
VRY_Prep
(
req
);
AZ
(
req
->
objcore
);
oc
=
HSH_Lookup
(
req
);
oc
=
HSH_Lookup
(
req
,
req
->
esi_level
==
0
?
1
:
0
);
if
(
oc
==
NULL
)
{
/*
* We lost the session to a busy object, disembark the
...
...
bin/varnishd/hash/hash_slinger.h
View file @
2f940fb9
...
...
@@ -53,7 +53,7 @@ struct hash_slinger {
/* cache_hash.c */
void
HSH_Cleanup
(
struct
worker
*
w
);
struct
objcore
*
HSH_Lookup
(
struct
req
*
);
struct
objcore
*
HSH_Lookup
(
struct
req
*
,
int
wait_for_busy
);
void
HSH_Ref
(
struct
objcore
*
o
);
void
HSH_Drop
(
struct
worker
*
,
struct
object
**
);
void
HSH_Init
(
const
struct
hash_slinger
*
slinger
);
...
...
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