From 4d69ed11284e1f1fae1e49b2c7119d47d6a7bdcf Mon Sep 17 00:00:00 2001 From: nishith hm Date: Fri, 30 May 2025 12:18:13 +0530 Subject: [PATCH 1/2] echo is not available for RedisCluster mode hence skipping the echo in cluster mode --- redisvl/redis/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redisvl/redis/connection.py b/redisvl/redis/connection.py index 5ec562d0..499c9fa0 100644 --- a/redisvl/redis/connection.py +++ b/redisvl/redis/connection.py @@ -397,7 +397,10 @@ def validate_sync_redis( redis_client.client_setinfo("LIB-NAME", _lib_name) except ResponseError: # Fall back to a simple log echo - redis_client.echo(_lib_name) + # For RedisCluster, echo is not available + if not isinstance(redis_client, RedisCluster): + redis_client.echo(_lib_name) + # Get list of modules installed_modules = RedisConnectionFactory.get_modules(redis_client) From 765445e5c15ff7985708f45d2355a08dfbc82bb6 Mon Sep 17 00:00:00 2001 From: nishith hm Date: Mon, 2 Jun 2025 17:03:29 +0530 Subject: [PATCH 2/2] updated for method validate_async_redis and changed condtion to hasattr --- redisvl/redis/connection.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/redisvl/redis/connection.py b/redisvl/redis/connection.py index 499c9fa0..4568b478 100644 --- a/redisvl/redis/connection.py +++ b/redisvl/redis/connection.py @@ -398,9 +398,8 @@ def validate_sync_redis( except ResponseError: # Fall back to a simple log echo # For RedisCluster, echo is not available - if not isinstance(redis_client, RedisCluster): - redis_client.echo(_lib_name) - + if hasattr(redis_client, "echo"): + await redis_client.echo(_lib_name) # Get list of modules installed_modules = RedisConnectionFactory.get_modules(redis_client) @@ -426,6 +425,8 @@ async def validate_async_redis( except ResponseError: # Fall back to a simple log echo await redis_client.echo(_lib_name) + if hasattr(redis_client, "echo"): + await redis_client.echo(_lib_name) # Get list of modules installed_modules = await RedisConnectionFactory.get_modules_async(redis_client)