Skip to content

feat(index): add epsilla connector #1835

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

Merged
merged 7 commits into from
Dec 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use HTTP 409 to check if db is already loaded
fix input validation logic

Signed-off-by: Tony Yang <tonyyanga@gmail.com>
  • Loading branch information
tonyyanga committed Dec 5, 2023
commit c6deb79c5029475de2f567f49860989b0938ed27
11 changes: 3 additions & 8 deletions docarray/index/backends/epsilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ def __init__(self, db_config=None, **kwargs):
)

if status_code != HTTPStatus.OK:
# Epsilla returns HTTP 500 when multiple clients connect to the same db
# Bug filed at https://github.com/epsilla-cloud/vectordb/issues/93
if status_code == HTTPStatus.INTERNAL_SERVER_ERROR and (
"Database catalog file is already loaded" in response["message"]
or "DB already exists" in response["message"]
):
if status_code == HTTPStatus.CONFLICT:
self._logger.info(f'{self._db_config.db_name} already loaded.')
else:
raise IOError(
Expand Down Expand Up @@ -278,7 +273,7 @@ def validate_self_hosted_config(self):
missing_attributes = [
attr
for attr in ["protocol", "host", "port", "db_path", "db_name"]
if getattr(self, attr, None) is not None
if getattr(self, attr, None) is None
]

if missing_attributes:
Expand All @@ -290,7 +285,7 @@ def validate_cloud_config(self):
missing_attributes_cloud = [
attr
for attr in ["cloud_project_id", "cloud_db_id", "api_key"]
if getattr(self, attr, None) is not None
if getattr(self, attr, None) is None
]

if missing_attributes_cloud:
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy