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
eaae581b
Commit
eaae581b
authored
Feb 06, 2015
by
antirez
Browse files
Remove optional single-key path from evictionPoolPopulate().
parent
05a39838
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
eaae581b
...
@@ -3136,13 +3136,7 @@ void evictionPoolPopulate(dict *sampledict, dict *keydict, struct evictionPoolEn
...
@@ -3136,13 +3136,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