DEBUG POPULATE: call dictExpand() to avoid useless rehashing.

This commit is contained in:
antirez 2014-05-09 15:02:29 +02:00
parent 8a170c817d
commit 72ff03346f

View File

@ -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));