Use dictGetFairRandomKey() for RANDOMKEY as well.

This commit is contained in:
antirez 2019-02-19 17:29:51 +01:00
parent 0ad63de59d
commit 94a9e27bb8

View File

@ -241,7 +241,7 @@ robj *dbRandomKey(redisDb *db) {
sds key;
robj *keyobj;
de = dictGetRandomKey(db->dict);
de = dictGetFairRandomKey(db->dict);
if (de == NULL) return NULL;
key = dictGetKey(de);