diff options
author | Kristján Valur Jónsson <sweskman@gmail.com> | 2022-09-28 13:21:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 16:21:19 +0300 |
commit | 6b3e0b491c4a348ca2e7a332e6f3b23a5da3c461 (patch) | |
tree | ae238a90ce3d724693c3ab4331f5ea1747871051 /redis/asyncio/cluster.py | |
parent | 7c6a8128660d713f11d34ed4b5652ccbd9548e52 (diff) | |
download | redis-py-6b3e0b491c4a348ca2e7a332e6f3b23a5da3c461.tar.gz |
Dev/no lock (#2308)
* Remove async lock in asyncio.Connection.read_response
* Skip concurrent-commands test on non-pooled connections
Diffstat (limited to 'redis/asyncio/cluster.py')
-rw-r--r-- | redis/asyncio/cluster.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/redis/asyncio/cluster.py b/redis/asyncio/cluster.py index 78dcd05..8d34b9a 100644 --- a/redis/asyncio/cluster.py +++ b/redis/asyncio/cluster.py @@ -390,7 +390,7 @@ class RedisCluster(AbstractRedis, AbstractRedisCluster, AsyncRedisClusterCommand # regardless of the server type. If this is a primary connection, # READONLY would not affect executing write commands. await connection.send_command("READONLY") - if str_if_bytes(await connection.read_response_without_lock()) != "OK": + if str_if_bytes(await connection.read_response()) != "OK": raise ConnectionError("READONLY command failed") def get_nodes(self) -> List["ClusterNode"]: @@ -866,11 +866,9 @@ class ClusterNode: ) -> Any: try: if NEVER_DECODE in kwargs: - response = await connection.read_response_without_lock( - disable_decoding=True - ) + response = await connection.read_response(disable_decoding=True) else: - response = await connection.read_response_without_lock() + response = await connection.read_response() except ResponseError: if EMPTY_RESPONSE in kwargs: return kwargs[EMPTY_RESPONSE] |