You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 5.0.3 (code hasn't changed in any subsequent version)
Platform: Python 3.8.6 / Almalinux 3.9 / AWS
Description: Calls to delete in asyncio RedisCluster do not execute if cluster_error_retry_attempts is 0
Last part of stack trace
return sum(await self._execute_pipeline_by_slot(command, slots_to_keys))
File "/usr/local/lib/python3.8/site-packages/redis/commands/cluster.py", line 341, in _execute_pipeline_by_slot
return await pipe.execute()
File "/usr/local/lib/python3.8/site-packages/redis/asyncio/cluster.py", line 1502, in execute
raise exception
UnboundLocalError: local variable 'exception' referenced before assignment
The retry logic in ClusterPipeline is incorrect, in that it will execute cluster_error_retry_attempts - 1 times as range(n) creates a list that is n-1 in length. So, when the variable is 0, it will not even execute the command once.