-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redis cluster client throws error on calling module_list() #2888
Labels
bug
Bug
Comments
baskaryan
added a commit
to langchain-ai/langchain
that referenced
this issue
Aug 11, 2023
This change updates the central utility class to recognize a Redis cluster server after connection and returns an new cluster aware Redis client. The "normal" Redis client would not be able to talk to a cluster node because keys might be stored on other shards of the Redis cluster and therefor not readable or writable. With this patch clients do not need to know what Redis server it is, they just connect though the same API calls for standalone and cluster server. There are no dependencies added due to this MR. Remark - with current redis-py client library (4.6.0) a cluster cannot be used as VectorStore. It can be used for other use-cases. There is a bug / missing feature(?) in the Redis client breaking the VectorStore implementation. I opened an issue at the client library too (redis/redis-py#2888) to fix this. As soon as this is fixed in `redis-py` library it should be usable there too. --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
danielchalef
pushed a commit
to danielchalef/langchain
that referenced
this issue
Aug 11, 2023
This change updates the central utility class to recognize a Redis cluster server after connection and returns an new cluster aware Redis client. The "normal" Redis client would not be able to talk to a cluster node because keys might be stored on other shards of the Redis cluster and therefor not readable or writable. With this patch clients do not need to know what Redis server it is, they just connect though the same API calls for standalone and cluster server. There are no dependencies added due to this MR. Remark - with current redis-py client library (4.6.0) a cluster cannot be used as VectorStore. It can be used for other use-cases. There is a bug / missing feature(?) in the Redis client breaking the VectorStore implementation. I opened an issue at the client library too (redis/redis-py#2888) to fix this. As soon as this is fixed in `redis-py` library it should be usable there too. --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: What redis-py and what redis version is the issue happening on?
redis_py 4.6.0
Server 6.0.16 (Debian 11 package) and newer (like 6.2 or 7.0)- Server must be run in Cluster mode
Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
python 3.11 on Debian 12
Description: Description of your issue, stack traces from errors and code that reproduces the issue
Creating an "normal" Redis client i am able to call the method
module_list()
on the client and get an list response (either empty or filled, depending on the server and modules installed there. Its working fine.Same is true for an Client created from a Redis Sentinel based connection. Calling
module_list()
gives a list response as expected.Now - whenever i create a Redis Cluster client the method cannot be called anymore, the client throws an exception instead of returning the list with all modules installed.
Example oth the error:
Working code - tested against the same server version. With the regular client i can connect to one cluster node directly also and call
module_list()
there too without problem (but not the get() and similar methods - there i get the "MOVED" answers as expected for cluster nodes):As the Cluster Redis client is expected to be a drop in replacement for most client actions the "module" methods should all be available there too.
Thanks in advance for looking into it
The text was updated successfully, but these errors were encountered: