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
ea640d47
Commit
ea640d47
authored
Jan 03, 2023
by
AlveElde
Committed by
Dridi Boukelmoune
Jan 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expire: Add hits to EXP_Expired log statement
This makes it easier to estimate the popularity of expired objects.
parent
796a645b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
cache_expire.c
bin/varnishd/cache/cache_expire.c
+3
-2
r02339.vtc
bin/varnishtest/tests/r02339.vtc
+2
-2
vsl_tags.h
include/tbl/vsl_tags.h
+2
-1
purge_c00000.vtc
vmod/tests/purge_c00000.vtc
+1
-1
No files found.
bin/varnishd/cache/cache_expire.c
View file @
ea640d47
...
...
@@ -354,8 +354,9 @@ exp_expire(struct exp_priv *ep, vtim_real now)
assert
(
oc
->
timer_idx
==
VBH_NOIDX
);
CHECK_OBJ_NOTNULL
(
oc
->
objhead
,
OBJHEAD_MAGIC
);
VSLb
(
&
ep
->
vsl
,
SLT_ExpKill
,
"EXP_Expired xid=%ju t=%.0f"
,
VXID
(
ObjGetXID
(
ep
->
wrk
,
oc
)),
EXP_Ttl
(
NULL
,
oc
)
-
now
);
VSLb
(
&
ep
->
vsl
,
SLT_ExpKill
,
"EXP_Expired x=%ju t=%.0f h=%ld"
,
VXID
(
ObjGetXID
(
ep
->
wrk
,
oc
)),
EXP_Ttl
(
NULL
,
oc
)
-
now
,
oc
->
hits
);
ObjSendEvent
(
ep
->
wrk
,
oc
,
OEV_EXPIRE
);
(
void
)
HSH_DerefObjCore
(
ep
->
wrk
,
&
oc
,
0
);
}
...
...
bin/varnishtest/tests/r02339.vtc
View file @
ea640d47
...
...
@@ -21,7 +21,7 @@ varnish v1 -vcl+backend {
varnish v1 -cliok "param.set timeout_idle 2"
logexpect l0 -v v1 -g raw {
expect * 0 ExpKill "EXP_Expired x
id
=1002"
expect * 0 ExpKill "EXP_Expired x=1002"
} -start
logexpect l2 -v v1 -g raw {
...
...
@@ -109,4 +109,4 @@ varnish v1 -errvcl "Not available in subroutine 'vcl_backend_response'" {
sub vcl_backend_response {
if (bereq.url == "response") { purge.hard(); }
}
}
\ No newline at end of file
}
include/tbl/vsl_tags.h
View file @
ea640d47
...
...
@@ -367,7 +367,7 @@ SLTM(ExpKill, 0, "Object expiry event",
"
\t
EXP_Inbox p=%p e=%f f=0x%x
\n
"
"
\t
EXP_Kill p=%p e=%f f=0x%x
\n
"
"
\t
EXP_When p=%p e=%f f=0x%x
\n
"
"
\t
EXP_Expired x=%u t=%f
\n
"
"
\t
EXP_Expired x=%u t=%f
h=%u
\n
"
"
\t
LRU_Cand p=%p f=0x%x r=%d
\n
"
"
\t
LRU x=%u
\n
"
"
\t
LRU_Fail
\n
"
...
...
@@ -380,6 +380,7 @@ SLTM(ExpKill, 0, "Object expiry event",
"
\t
f=0x%x Objcore flags
\n
"
"
\t
r=%d Objcore refcount
\n
"
"
\t
x=%u Object VXID
\n
"
"
\t
h=%u Objcore hits
\n
"
"
\n
"
)
...
...
vmod/tests/purge_c00000.vtc
View file @
ea640d47
...
...
@@ -68,7 +68,7 @@ logexpect l2 -v v1 -q "Begin ~ bgfetch" {
} -start
logexpect l3 -v v1 -g raw -q "vxid == 0" {
expect * * ExpKill x
id
=1008
expect * * ExpKill x=1008
} -start
client c1 {
...
...
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