redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

Calling pipelined function evalsha is blocked when running redis in cluster mode

Open zdc13 opened this issue 2 years ago • 4 comments

Version: 5.0.0

Platform: Python 3.10 on MacOS 13

Description:

The following code does not work:

client = redis.RedisCluster()
pipe = client.pipeline()
pipe.evalsha(sha, 0)
pipe.execute()

redis.exceptions.RedisClusterException: ERROR: Calling pipelined function evalsha is blocked when running redis in cluster mode...

Why is this disallowed? AFAICT this should work fine if the scripts are loaded. It's disallowed in redis/cluster.py in PIPELINE_BLOCKED_COMMANDS, but no reason is documented.

zdc13 avatar Aug 24 '23 18:08 zdc13

I'm also trying to run a script with pipeline and getting the same error

carlosrochap avatar Oct 31 '23 22:10 carlosrochap

can this be addressed, a similar issue in the node version was fixed: as @zdc13 mentioned, there is no reason why EVALSHA should be a blocked command when run in ClusterPipeline as long as the script is loaded which can be ensured.

reference to explanation: https://github.com/redis/ioredis/issues/536#issuecomment-347020520

rahmed-hartree avatar Nov 07 '23 15:11 rahmed-hartree

Any updates here?

serozhenka avatar Mar 05 '24 09:03 serozhenka

Is there any progress on this issue? Maybe the changes from this PR can be ported to the python library?

AIexanderDicke avatar May 22 '24 16:05 AIexanderDicke

I also just ran into this.

GuyEP-Modulate avatar Jul 10 '25 23:07 GuyEP-Modulate