mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 00:20:50 +00:00
Use dictGetFairRandomKey() for RANDOMKEY as well.
This commit is contained in:
parent
25b392f90c
commit
35ffbead5c
2
src/db.c
2
src/db.c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user