-
Notifications
You must be signed in to change notification settings - Fork 539
Add support of the new command SINTERCARD(Redis 7) #1444
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
Conversation
4ebf856
to
52e1308
Compare
52e1308
to
fa3f797
Compare
024738e
to
eead30f
Compare
The flaky test still exists after applying #1449 and it should be caused by the retry in Go redis client. |
576073e
to
dd0ab3c
Compare
ready for reviews. |
8a9f67d
to
634a00b
Compare
The PR doesn't have complete tests for wrong parsing msgs based on the latest updating currently. Please wait me for a few days(Sorry, I am moving home). |
@infdahai Thanks, no hurry. Can ping back while your PR is ready to review. |
582d1b5
to
4796c4b
Compare
@git-hulk I was resurrected. Ready to review. |
0dc91ff
to
f31a711
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it seems like the functionality is correct.
However, I don't like the implementation because (if I understood properly) the cnt
parameter of the Set::Inter
function serves as the sign that this function calculates only cardinality AND passes the limit (which has only the SINTERCARD
command) AND simultaneously serves as the return value. The idea to introduce a separate function directly is bothering me every time I review this PR.
The disadvantage is obviously the additional function in this case.
I would like to hear @git-hulk , @PragmaTwice on this.
Signed-off-by: clundro <infdahai@outlook.com>
Signed-off-by: clundro <infdahai@outlook.com>
https://github.com/apache/incubator-kvrocks/actions/runs/5234808336/jobs/9452175246 Do we need to ignore this? |
Nope. The build procedure need to succeed in Darwin. It cannot be ignored. You can add some type cast before the std::min call to make it compile successfully. |
Signed-off-by: clundro <infdahai@outlook.com>
@infdahai You didn't actually split the |
@torwig I just thought if I split the functions, these two functions exist duplicate codes before and we add the limit I remove the if statements but use duplicate |
Signed-off-by: clundro <infdahai@outlook.com>
Signed-off-by: clundro <infdahai@outlook.com>
Signed-off-by: clundro <infdahai@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, LGTM.
Thanks all, merging... |
@infdahai Can add the SINTERCARD command to https://github.com/apache/incubator-kvrocks-website/blob/main/docs/supported-commands.md |
closes #1083
closes #1116 (replace)
This PR introduces a
sintercard
command tokvrocks
from redis 7.0.BTW, thego-redis
package's version isv9.0.0-beta.2
in the project so it doesn't support this command(more infomation in redis/go-redis#2291). And I just write a bare test ingo-test
now.Perhaps we can bumpgo-redis
to a newer version.