Open
Description
The unannounced introduction of asyncio.Lock
when acquiring a connection from the pool in #3445 is causing noticeable performance degradation:
redis-py/redis/asyncio/connection.py
Lines 1095 to 1105 in 653d9ef
This becomes especially evident under high load, where lock contention becomes a bottleneck. The issue affects version 5.3.0 and later. Others have also reported performance impacts, as noted in #3624.
I kind of understand the rationale behind this change, but personally, I would acquire the lock only to pop a connection and then performs ensure_connection
outside the lock. Alternatively, if it didn’t appear to cause issues in earlier versions, may be no lock at all?
Metadata
Metadata
Assignees
Labels
No labels