Use dictGetFairRandomKey() for RANDOMKEY as well.

This commit is contained in:
antirez 2019-02-19 17:29:51 +01:00
parent 25b392f90c
commit 35ffbead5c

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