Skip to content

Commit

Permalink
enhance: get and delete to use schema cache (#2606)
Browse files Browse the repository at this point in the history
enhance: get and delete to use schema cache
issue: milvus-io/milvus#39093

Signed-off-by: Xianhui.Lin <[email protected]>
  • Loading branch information
JsDove authored Feb 6, 2025
1 parent c5a3c18 commit 3056999
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pymilvus/milvus_client/milvus_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def get(

conn = self._get_connection()
try:
schema_dict = conn.describe_collection(collection_name, timeout=timeout, **kwargs)
schema_dict, _ = conn._get_schema_from_cache_or_remote(collection_name, timeout=timeout)
except Exception as ex:
logger.error("Failed to describe collection: %s", collection_name)
raise ex from ex
Expand Down Expand Up @@ -796,7 +796,9 @@ def delete(
conn = self._get_connection()
if len(pks) > 0:
try:
schema_dict = conn.describe_collection(collection_name, timeout=timeout, **kwargs)
schema_dict, _ = conn._get_schema_from_cache_or_remote(
collection_name, timeout=timeout
)
except Exception as ex:
logger.error("Failed to describe collection: %s", collection_name)
raise ex from ex
Expand Down

0 comments on commit 3056999

Please sign in to comment.