Jump to solution
Verify

The Fix

pip install redis==7.1.0

Based on closed redis/redis-py issue #2305 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -17,7 +17,13 @@ from redis.asyncio.client import ResponseCallbackT -from redis.asyncio.connection import Connection, DefaultParser, Encoder, parse_url +from redis.asyncio.connection import ( + Connection,
repro.py
def delete(self, *keys: KeyT) -> ResponseT: """ Deletes the given keys in the cluster. The keys are first split up into slots and then an DEL command is sent for every slot Non-existant keys are ignored. Returns the number of keys that were deleted. For more information see https://redis.io/commands/del """ return self._split_command_across_slots("DEL", *keys)
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: This fix should not be used if the delete API is expected to handle multiple slots in a single command.\n\n

Why This Fix Works in Production

  • Trigger: raise RedisClusterException(
  • Mechanism: The delete API in the async Redis cluster pipeline incorrectly inherited behavior from the ClusterMultiKeyCommands class
  • Why the fix works: Fixed the inheritance issue of the delete API in the async Redis cluster pipeline, ensuring it behaves as expected when deleting multiple keys. (first fixed release: 7.1.0).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Shows up under Python 3.9 in real deployments (not just unit tests).
  • The delete API in the async Redis cluster pipeline incorrectly inherited behavior from the ClusterMultiKeyCommands class
  • Production symptom (often without a traceback): raise RedisClusterException(

Proof / Evidence

  • GitHub issue: #2305
  • Fix PR: https://github.com/redis/redis-py/pull/2217
  • First fixed release: 7.1.0
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.65

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“After taking a closer look at the code, the async RedisCluster's delete(*keys) would eventually aggregate over node and send everything in a pipeline, which is…”
@karwinliu · 2022-07-27 · repro detail · source
“I don't think you can include keys from multiple slots in the same delete command, but ultimately all the commands are sent over the same…”
@utkarshgupta137 · 2022-07-27 · source
“@utkarshgupta137 I did a double check and it seems to be working now both with async RedisCluster (e.g”
@karwinliu · 2022-07-27 · source
“I thought currently if I call async RedisCLuster's delete() with multiple keys, it would still work -- first split keys by slot and then send…”
@karwinliu · 2022-07-27 · source

Failure Signature (Search String)

  • raise RedisClusterException(
  • which will throw errors.
Copy-friendly signature
signature.txt
Failure Signature ----------------- raise RedisClusterException( which will throw errors.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- raise RedisClusterException( which will throw errors.

Minimal Reproduction

repro.py
def delete(self, *keys: KeyT) -> ResponseT: """ Deletes the given keys in the cluster. The keys are first split up into slots and then an DEL command is sent for every slot Non-existant keys are ignored. Returns the number of keys that were deleted. For more information see https://redis.io/commands/del """ return self._split_command_across_slots("DEL", *keys)

Environment

  • Python: 3.9

What Broke

Unexpected behavior when deleting multiple keys in an async pipeline led to performance issues.

Why It Broke

The delete API in the async Redis cluster pipeline incorrectly inherited behavior from the ClusterMultiKeyCommands class

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install redis==7.1.0

When NOT to use: This fix should not be used if the delete API is expected to handle multiple slots in a single command.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/redis/redis-py/pull/2217

First fixed release: 7.1.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix should not be used if the delete API is expected to handle multiple slots in a single command.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
  • Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.

Version Compatibility Table

VersionStatus
7.1.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.