Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
35ffbead
Commit
35ffbead
authored
Feb 19, 2019
by
antirez
Browse files
Use dictGetFairRandomKey() for RANDOMKEY as well.
parent
25b392f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
35ffbead
...
@@ -241,7 +241,7 @@ robj *dbRandomKey(redisDb *db) {
...
@@ -241,7 +241,7 @@ robj *dbRandomKey(redisDb *db) {
sds
key
;
sds
key
;
robj
*
keyobj
;
robj
*
keyobj
;
de
=
dictGetRandomKey
(
db
->
dict
);
de
=
dictGet
Fair
RandomKey
(
db
->
dict
);
if
(
de
==
NULL
)
return
NULL
;
if
(
de
==
NULL
)
return
NULL
;
key
=
dictGetKey
(
de
);
key
=
dictGetKey
(
de
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment