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
9243e4a4
Commit
9243e4a4
authored
May 29, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop VCL's health-polling of backend already when we discard the VCL.
Fixes #1141
parent
42cf6a92
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
cache.h
bin/varnishd/cache/cache.h
+2
-0
cache_backend.c
bin/varnishd/cache/cache_backend.c
+19
-2
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+7
-2
No files found.
bin/varnishd/cache/cache.h
View file @
9243e4a4
...
...
@@ -691,6 +691,8 @@ void VCA_FailSess(struct worker *w);
/* cache_backend.c */
void
VBE_UseHealth
(
const
struct
director
*
vdi
);
void
VBE_DiscardHealth
(
const
struct
director
*
vdi
);
struct
vbc
*
VDI_GetFd
(
const
struct
director
*
,
struct
sess
*
sp
);
int
VDI_Healthy
(
const
struct
director
*
,
const
struct
sess
*
sp
);
...
...
bin/varnishd/cache/cache_backend.c
View file @
9243e4a4
...
...
@@ -428,6 +428,25 @@ VBE_UseHealth(const struct director *vdi)
VBP_Use
(
vs
->
backend
,
vs
->
vrt
->
probe
);
}
/*--------------------------------------------------------------------
*
*/
void
VBE_DiscardHealth
(
const
struct
director
*
vdi
)
{
struct
vdi_simple
*
vs
;
ASSERT_CLI
();
if
(
strcmp
(
vdi
->
name
,
"simple"
))
return
;
CAST_OBJ_NOTNULL
(
vs
,
vdi
->
priv
,
VDI_SIMPLE_MAGIC
);
if
(
vs
->
vrt
->
probe
==
NULL
)
return
;
VBP_Remove
(
vs
->
backend
,
vs
->
vrt
->
probe
);
}
/*--------------------------------------------------------------------
*
*/
...
...
@@ -470,8 +489,6 @@ vdi_simple_fini(const struct director *d)
CHECK_OBJ_NOTNULL
(
d
,
DIRECTOR_MAGIC
);
CAST_OBJ_NOTNULL
(
vs
,
d
->
priv
,
VDI_SIMPLE_MAGIC
);
if
(
vs
->
vrt
->
probe
!=
NULL
)
VBP_Remove
(
vs
->
backend
,
vs
->
vrt
->
probe
);
VBE_DropRefVcl
(
vs
->
backend
);
free
(
vs
->
dir
.
vcl_name
);
vs
->
dir
.
magic
=
0
;
...
...
bin/varnishd/cache/cache_vcl.c
View file @
9243e4a4
...
...
@@ -278,10 +278,10 @@ static void
ccf_config_discard
(
struct
cli
*
cli
,
const
char
*
const
*
av
,
void
*
priv
)
{
struct
vcls
*
vcl
;
int
i
;
ASSERT_CLI
();
(
void
)
av
;
(
void
)
priv
;
AZ
(
priv
);
vcl
=
vcl_find
(
av
[
2
]);
if
(
vcl
==
NULL
)
{
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
...
...
@@ -299,6 +299,11 @@ ccf_config_discard(struct cli *cli, const char * const *av, void *priv)
VSC_C_main
->
n_vcl_avail
--
;
vcl
->
conf
->
discard
=
1
;
Lck_Unlock
(
&
vcl_mtx
);
/* Tickle this VCL's backends to give up health polling */
for
(
i
=
1
;
i
<
vcl
->
conf
->
ndirector
;
i
++
)
VBE_DiscardHealth
(
vcl
->
conf
->
director
[
i
]);
if
(
vcl
->
conf
->
busy
==
0
)
VCL_Nuke
(
vcl
);
}
...
...
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