-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Version: v4.3.4
Platform: Python 3.9 on linux/macOS
Description: When multiple pipelines are happening in parallel (e.g. running with asyncio or trio), it's possible to trigger a race condition where the last pipeline would clear up all the queued commands in the stack from other pipelines. The code that has issue is in redis/asyncio/cluster.py file,
node = target_nodes[0]
if node.name not in nodes:
nodes[node.name] = node
node._command_stack = []
node._command_stack.append(cmd)
All the pipelines seem to share the same node._command_stack
, and one could overwrite the others before the commands get sent out. We've seen this issue in our code consistently. We've locally patched the code to maintain a command stack per pipeline instead of per node and that seems to have fixed the issue.
Metadata
Metadata
Assignees
Labels
No labels