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
3bcbdfd3
Commit
3bcbdfd3
authored
Feb 06, 2015
by
antirez
Browse files
Remove optional single-key path from evictionPoolPopulate().
parent
4038bbe2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
3bcbdfd3
...
@@ -3147,13 +3147,7 @@ void evictionPoolPopulate(dict *sampledict, dict *keydict, struct evictionPoolEn
...
@@ -3147,13 +3147,7 @@ void evictionPoolPopulate(dict *sampledict, dict *keydict, struct evictionPoolEn
samples
=
zmalloc
(
sizeof
(
samples
[
0
])
*
server
.
maxmemory_samples
);
samples
=
zmalloc
(
sizeof
(
samples
[
0
])
*
server
.
maxmemory_samples
);
}
}
#if 1
/* Use bulk get by default. */
count
=
dictGetSomeKeys
(
sampledict
,
samples
,
server
.
maxmemory_samples
);
count
=
dictGetSomeKeys
(
sampledict
,
samples
,
server
.
maxmemory_samples
);
#else
count
=
server
.
maxmemory_samples
;
for
(
j
=
0
;
j
<
count
;
j
++
)
samples
[
j
]
=
dictGetRandomKey
(
sampledict
);
#endif
for
(
j
=
0
;
j
<
count
;
j
++
)
{
for
(
j
=
0
;
j
<
count
;
j
++
)
{
unsigned
long
long
idle
;
unsigned
long
long
idle
;
sds
key
;
sds
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