Commit 3bcbdfd3 authored by antirez's avatar antirez
Browse files

Remove optional single-key path from evictionPoolPopulate().

parent 4038bbe2
...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment