summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-05-09 15:02:29 +0200
committerantirez <antirez@gmail.com>2014-05-09 15:05:31 +0200
commit6ae4c1fcbc59768406344e3f277f51a26fb719de (patch)
tree2f2e0a05bf250573cfaf8454e589a04a037db47f
parent13d8b2b096ea1e7b45332cac0fedf41c4e29f767 (diff)
downloadredis-6ae4c1fcbc59768406344e3f277f51a26fb719de.tar.gz
DEBUG POPULATE: call dictExpand() to avoid useless rehashing.
-rw-r--r--src/debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/debug.c b/src/debug.c
index 0cc8dcf22..b6735749b 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -326,6 +326,7 @@ void debugCommand(redisClient *c) {
if (getLongFromObjectOrReply(c, c->argv[2], &keys, NULL) != REDIS_OK)
return;
+ dictExpand(c->db->dict,keys);
for (j = 0; j < keys; j++) {
snprintf(buf,sizeof(buf),"key:%lu",j);
key = createStringObject(buf,strlen(buf));