-
Notifications
You must be signed in to change notification settings - Fork 328
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
[Bug]: db_name should return when list_connections called #2161
Comments
@XuanYang-cn I am facing the same issue where I am unable to switch different databases for collections in langchain. It all goes to default even when Also, noticed this PR. Would it resolve this issue? #1446 To get it working, I need to call this on every database I am connected to before running the operation so that the registry is clean and then connect back again. This looks like a bug, not a feature. This works:
If I directly do it without that, it doesn't since the existing connections array is not empty and you are always picking con[0] |
Also, the connection object seems global in nature - can that be made local? For eg. lets say I want to have a dict like this:
This currently doesn't seem possible since all connections seem to go in a global connections object if I am not wrong Similar stackoverflow thread here: https://stackoverflow.com/a/78144442 |
@XuanYang-cn Was able to get it working by modifying 1st change: I had to add this condition to if in pymilvus to reuse connection by comparing db_name as well (line 346 in screenshot) in langchain_milvus package in Also, I got rid of popping db_name from |
@XuanYang-cn I believe this was just one line fix. Do you have a plan to fix it? Langchain team has made the changes which now make it worst as if I provide db name anything else rather than CC: @tvvignesh |
Is there an existing issue for this?
Describe the bug
I have a requirement where I need to connect to different db on same address (host + port) at the same time. And I have to use existing connection if it's alive for this is the code has been written (basically written in langchain codebase)
Let's say collection_1 is connected to db_1 and Now I want collection_2 will be connect to db_2. As
addr = connections.get_connection_addr(con[0])
don't have the db_name value the if block will be executed and provide db_1 connection which is wrong.I believe this is single line fix when connect to milvus we should store the db_name instead of popping.
Code from Milvus:
Expected Behavior
No response
Steps/Code To Reproduce behavior
No response
Environment details
Anything else?
No response
The text was updated successfully, but these errors were encountered: