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
19150844
Commit
19150844
authored
Apr 29, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give the busyobj a copy of req->digest, and move adding saintmode entries
to use busyobj.
parent
d274585f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
12 deletions
+13
-12
cache.h
bin/varnishd/cache/cache.h
+1
-0
cache_backend.c
bin/varnishd/cache/cache_backend.c
+5
-8
cache_backend.h
bin/varnishd/cache/cache_backend.h
+1
-1
cache_busyobj.c
bin/varnishd/cache/cache_busyobj.c
+2
-0
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+3
-2
generate.py
lib/libvcl/generate.py
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
19150844
...
...
@@ -516,6 +516,7 @@ struct busyobj {
struct
http
*
bereq
;
struct
http
*
beresp
;
struct
object
*
fetch_obj
;
unsigned
char
digest
[
DIGEST_LEN
];
struct
exp
exp
;
struct
http_conn
htc
;
...
...
bin/varnishd/cache/cache_backend.c
View file @
19150844
...
...
@@ -228,27 +228,24 @@ vbe_NewConn(void)
*/
void
VBE_AddTrouble
(
const
struct
req
*
req
,
double
dt
)
VBE_AddTrouble
(
const
struct
busyobj
*
bo
,
double
expires
)
{
struct
trouble
*
tp
;
struct
vbc
*
vbc
;
struct
backend
*
be
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
busyobj
,
BUSYOBJ_MAGIC
);
vbc
=
req
->
busyobj
->
vbc
;
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
vbc
=
bo
->
vbc
;
if
(
vbc
==
NULL
)
return
;
CHECK_OBJ_NOTNULL
(
vbc
,
VBC_MAGIC
);
be
=
vbc
->
backend
;
CHECK_OBJ_NOTNULL
(
be
,
BACKEND_MAGIC
);
if
(
dt
<=
0
.)
return
;
ALLOC_OBJ
(
tp
,
TROUBLE_MAGIC
);
if
(
tp
==
NULL
)
return
;
memcpy
(
tp
->
digest
,
req
->
digest
,
sizeof
tp
->
digest
);
tp
->
timeout
=
req
->
t_req
+
dt
;
memcpy
(
tp
->
digest
,
bo
->
digest
,
sizeof
tp
->
digest
);
tp
->
timeout
=
expires
;
Lck_Lock
(
&
vbc
->
backend
->
mtx
);
VTAILQ_INSERT_HEAD
(
&
be
->
troublelist
,
tp
,
list
);
be
->
n_trouble
++
;
...
...
bin/varnishd/cache/cache_backend.h
View file @
19150844
...
...
@@ -169,7 +169,7 @@ struct vbc {
/* cache_backend.c */
void
VBE_ReleaseConn
(
struct
vbc
*
vc
);
void
VBE_AddTrouble
(
const
struct
req
*
req
,
double
dt
);
void
VBE_AddTrouble
(
const
struct
busyobj
*
,
double
expires
);
/* cache_backend_cfg.c */
void
VBE_DropRefConn
(
struct
backend
*
);
...
...
bin/varnishd/cache/cache_busyobj.c
View file @
19150844
...
...
@@ -137,6 +137,8 @@ VBO_GetBusyObj(struct worker *wrk, struct req *req)
WS_Init
(
bo
->
ws
,
"bo"
,
p
,
bo
->
end
-
p
);
memcpy
(
bo
->
digest
,
req
->
digest
,
sizeof
bo
->
digest
);
bo
->
do_stream
=
1
;
return
(
bo
);
...
...
bin/varnishd/cache/cache_vrt.c
View file @
19150844
...
...
@@ -391,10 +391,11 @@ VRT_BOOL_string(unsigned val)
*/
void
VRT_l_beresp_saintmode
(
const
struct
req
*
req
,
double
a
)
VRT_l_beresp_saintmode
(
const
struct
busyobj
*
bo
,
double
a
)
{
VBE_AddTrouble
(
req
,
a
);
if
(
a
>
0
.)
VBE_AddTrouble
(
bo
,
a
+
VTIM_real
());
}
/*--------------------------------------------------------------------*/
...
...
lib/libvcl/generate.py
View file @
19150844
...
...
@@ -295,7 +295,7 @@ sp_variables = (
'DURATION'
,
(
),
(
'backend_response'
,),
'c
R
'
'c
B
'
),
(
'beresp.status'
,
'INT'
,
...
...
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