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
5517f362
Unverified
Commit
5517f362
authored
Jun 13, 2021
by
Binbin
Committed by
GitHub
Jun 13, 2021
Browse files
Remove duplicate dbid lookup in performEvictions. (#9063)
Minor code cleanup.
parent
fb140a1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/evict.c
View file @
5517f362
...
...
@@ -572,10 +572,10 @@ int performEvictions(void) {
bestdbid
=
pool
[
k
].
dbid
;
if
(
server
.
maxmemory_policy
&
MAXMEMORY_FLAG_ALLKEYS
)
{
de
=
dictFind
(
server
.
db
[
pool
[
k
].
dbid
].
dict
,
de
=
dictFind
(
server
.
db
[
best
dbid
].
dict
,
pool
[
k
].
key
);
}
else
{
de
=
dictFind
(
server
.
db
[
pool
[
k
].
dbid
].
expires
,
de
=
dictFind
(
server
.
db
[
best
dbid
].
expires
,
pool
[
k
].
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