Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
29b37942
Commit
29b37942
authored
Feb 01, 2012
by
antirez
Browse files
Only incremnet stats for key miss/hit when the key is semantically accessed in read-only.
parent
58bfbd1f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/db.c
View file @
29b37942
...
...
@@ -37,17 +37,22 @@ robj *lookupKey(redisDb *db, robj *key) {
if
(
notify
)
handleClientsBlockedOnSwappedKey
(
db
,
key
);
}
}
server
.
stat_keyspace_hits
++
;
return
val
;
}
else
{
server
.
stat_keyspace_misses
++
;
return
NULL
;
}
}
robj
*
lookupKeyRead
(
redisDb
*
db
,
robj
*
key
)
{
robj
*
val
;
expireIfNeeded
(
db
,
key
);
return
lookupKey
(
db
,
key
);
val
=
lookupKey
(
db
,
key
);
if
(
val
==
NULL
)
server
.
stat_keyspace_misses
++
;
else
server
.
stat_keyspace_hits
++
;
return
val
;
}
robj
*
lookupKeyWrite
(
redisDb
*
db
,
robj
*
key
)
{
...
...
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