-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the implementation of SRANDMEMBER #2014
Comments
hello could you please assign this to. Interested in this problem |
@wsehjk assigned, thank you! |
Thanks, I'm newbie to this project. Does this project have any community where developers can communicate? |
Yes, you can join the WeChat group via the official account at the bottom of README if you're using WeChat. Or you can join the Slack channel which is also mentioned in README. |
Hi, here is a question. If the number of member (k) is less than the count we want to select, under the context of random, does it ok to generate results less than k? |
@wsehjk https://github.com/apache/kvrocks/pull/1565/files this is a example for our current impl |
thanks, i will take a look at this. And i'm gonna try Reservoir Sampling |
Search before asking
Motivation
Currently it just returns the first N members, which is not actually random.
We can improve it just like the implementation of HRANDMEMBER.
(Or if you have better ideas for random, feel free to implement them)
Solution
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: