-
Notifications
You must be signed in to change notification settings - Fork 0
remove COMMAND GETKEYS
call from ZUNION
and ZUNIONSTORE
#4
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
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4 +/- ##
==========================================
- Coverage 92.36% 92.35% -0.01%
==========================================
Files 119 119
Lines 30600 30615 +15
==========================================
+ Hits 28265 28276 +11
- Misses 2335 2339 +4
☔ View full report in Codecov by Sentry. |
d47dbe7
to
82ec943
Compare
COMMAND GETKEYS
call from ZUNION
and ZUNIONSTORE
COMMAND GETKEYS
call from ZUNION
and ZUNIONSTORE
82ec943
to
4b228cf
Compare
@@ -968,6 +968,14 @@ def determine_slot(self, *args): | |||
if len(eval_keys) == 0: | |||
return random.randrange(0, REDIS_CLUSTER_HASH_SLOTS) | |||
keys = eval_keys | |||
elif command == "ZUNIONSTORE": |
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.
georadius
georadiusbymember
migrate
sort
sort_ro
zdiffstore
zinterstore
shouldn't we raise an exception for above commands?
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.
I assume that we are not using those commands, but just in case.
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.
yeap, i'm trying to block those commands in soda code, let me write the PR link once it's ready
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.
got it, please be careful that we should block direct call like execute_command(sort)
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.
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.
LGTM 🚀
* make EVALSHA and EVALSHA_RO to avoid command_keys as well * make ZUNION, ZUNIONSTORE to avoid command_keys as well
* make EVALSHA and EVALSHA_RO to avoid command_keys as well * make ZUNION, ZUNIONSTORE to avoid command_keys as well
* make EVALSHA and EVALSHA_RO to avoid command_keys as well * make ZUNION, ZUNIONSTORE to avoid command_keys as well
* make EVALSHA and EVALSHA_RO to avoid command_keys as well * make ZUNION, ZUNIONSTORE to avoid command_keys as well
* make EVALSHA and EVALSHA_RO to avoid command_keys as well * make ZUNION, ZUNIONSTORE to avoid command_keys as well
* make EVALSHA and EVALSHA_RO to avoid command_keys as well * make ZUNION, ZUNIONSTORE to avoid command_keys as well
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Redis 7 has a bug, which causes the server to crash with large size of keys in
COMMAND GETKEYS
redis/redis#12380
In order for us to execute
ZUNIONSTORE
without a crash, this PR manually extracts keys from theZUNIONSTORE
without callingCOMMAND GETKEYS