summaryrefslogtreecommitdiff
path: root/redis/commands/parser.py
diff options
context:
space:
mode:
authorJake Barnwell <2320567+jakebarnwell@users.noreply.github.com>2022-02-22 07:07:22 -0500
committerGitHub <noreply@github.com>2022-02-22 14:07:22 +0200
commite5ac39ac7b2728d14bfc27aac989b1085b7f6199 (patch)
treedc4e64f23a73f5b85d00bacc1e6f194d2af04c9b /redis/commands/parser.py
parent1983905d5adceaba2c3b27ba8f569dcb5387cc35 (diff)
downloadredis-py-e5ac39ac7b2728d14bfc27aac989b1085b7f6199.tar.gz
Add cluster support for scripting (#1937)
* Add cluster support for scripting * Fall back to connection_pool.get_encoder if necessary * Add documentation for cluster-based scripting * Add test for flush response Co-authored-by: dvora-h <dvora.heller@redis.com>
Diffstat (limited to 'redis/commands/parser.py')
-rw-r--r--redis/commands/parser.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/redis/commands/parser.py b/redis/commands/parser.py
index 4cce800..2bb0576 100644
--- a/redis/commands/parser.py
+++ b/redis/commands/parser.py
@@ -24,7 +24,14 @@ class CommandsParser:
# https://github.com/redis/redis/pull/8324
def get_keys(self, redis_conn, *args):
"""
- Get the keys from the passed command
+ Get the keys from the passed command.
+
+ NOTE: Due to a bug in redis<7.0, this function does not work properly
+ for EVAL or EVALSHA when the `numkeys` arg is 0.
+ - issue: https://github.com/redis/redis/issues/9493
+ - fix: https://github.com/redis/redis/pull/9733
+
+ So, don't use this function with EVAL or EVALSHA.
"""
if len(args) < 2:
# The command has no keys in it
@@ -72,6 +79,14 @@ class CommandsParser:
return keys
def _get_moveable_keys(self, redis_conn, *args):
+ """
+ NOTE: Due to a bug in redis<7.0, this function does not work properly
+ for EVAL or EVALSHA when the `numkeys` arg is 0.
+ - issue: https://github.com/redis/redis/issues/9493
+ - fix: https://github.com/redis/redis/pull/9733
+
+ So, don't use this function with EVAL or EVALSHA.
+ """
pieces = []
cmd_name = args[0]
# The command name should be splitted into separate arguments,