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
5b6377e3
Commit
5b6377e3
authored
Nov 27, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get the VCL state tracking precise enough to pass our testcases
parent
d50db264
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+1
-2
mgt_vcl.c
bin/varnishd/mgt/mgt_vcl.c
+1
-1
v00045.vtc
bin/varnishtest/tests/v00045.vtc
+2
-2
No files found.
bin/varnishd/cache/cache_vcl.c
View file @
5b6377e3
...
...
@@ -997,8 +997,7 @@ vcl_cli_discard(struct cli *cli, const char * const *av, void *priv)
free
(
vcl
->
loaded_name
);
AZ
(
errno
=
pthread_rwlock_destroy
(
&
vcl
->
temp_rwl
));
FREE_OBJ
(
vcl
);
}
else
{
assert
(
vcl
->
temp
==
VCL_TEMP_COLD
);
}
else
if
(
vcl
->
temp
==
VCL_TEMP_COLD
)
{
VCL_Poll
();
}
}
...
...
bin/varnishd/mgt/mgt_vcl.c
View file @
5b6377e3
...
...
@@ -750,7 +750,7 @@ mcf_vcl_discard(struct cli *cli, const char * const *av, void *priv)
(
void
)
mgt_vcl_setstate
(
cli
,
vp
,
VCL_STATE_COLD
);
if
(
MCH_Running
())
{
/* XXX If this fails the child is crashing, figure that later */
assert
(
!
vp
->
warm
);
assert
(
vp
->
state
!=
VCL_STATE_WARM
);
(
void
)
mgt_cli_askchild
(
&
status
,
&
p
,
"vcl.discard %s
\n
"
,
av
[
2
]);
free
(
p
);
}
...
...
bin/varnishtest/tests/v00045.vtc
View file @
5b6377e3
...
...
@@ -17,7 +17,7 @@ varnish v1 -cliok "vcl.state vcl1 cold"
# We should now see it as cooling
delay 1
varnish v1 -cliexpect "
auto
/cooling.*vcl1" vcl.list
varnish v1 -cliexpect "
cold
/cooling.*vcl1" vcl.list
# It can't be warmed up yet
delay 1
...
...
@@ -25,7 +25,7 @@ varnish v1 -cliexpect "vmod-debug ref on vcl1" "vcl.state vcl1 warm"
# It will eventually cool down
delay 2
varnish v1 -cliexpect "
auto
/cold.*vcl1" vcl.list
varnish v1 -cliexpect "
cold
/cold.*vcl1" vcl.list
# At this point it becomes possible to warm up again
varnish v1 -cliok "vcl.state vcl1 warm"
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