Skip to content

Commit 1ab7d32

Browse files
jac0626silas.jiang
andauthored
fix:remove some old function calls after refactor schema cache (#3197)
see #3186 Signed-off-by: silas.jiang <silas.jiang@zilliz.com> Co-authored-by: silas.jiang <silas.jiang@zilliz.com>
1 parent 8170c6c commit 1ab7d32

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

pymilvus/milvus_client/async_milvus_client.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,7 @@ async def query(
447447

448448
if ids:
449449
try:
450-
schema_dict, _ = await conn._get_schema_from_cache_or_remote(
451-
collection_name, timeout=timeout
452-
)
450+
schema_dict, _ = await conn._get_schema(collection_name, timeout=timeout)
453451
except Exception as ex:
454452
raise ex from ex
455453
filter = self._pack_pks_expr(schema_dict, ids)
@@ -484,9 +482,7 @@ async def get(
484482

485483
conn = self._get_connection()
486484
try:
487-
schema_dict, _ = await conn._get_schema_from_cache_or_remote(
488-
collection_name, timeout=timeout
489-
)
485+
schema_dict, _ = await conn._get_schema(collection_name, timeout=timeout)
490486
except Exception as ex:
491487
raise ex from ex
492488

@@ -542,9 +538,7 @@ async def delete(
542538
conn = self._get_connection()
543539
if len(pks) > 0:
544540
try:
545-
schema_dict, _ = await conn._get_schema_from_cache_or_remote(
546-
collection_name, timeout=timeout
547-
)
541+
schema_dict, _ = await conn._get_schema(collection_name, timeout=timeout)
548542
except Exception as ex:
549543
raise ex from ex
550544
expr = self._pack_pks_expr(schema_dict, pks)

pymilvus/milvus_client/milvus_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def query(
460460
conn = self._get_connection()
461461

462462
if ids:
463-
schema_dict, _ = conn._get_schema_from_cache_or_remote(collection_name, timeout=timeout)
463+
schema_dict, _ = conn._get_schema(collection_name, timeout=timeout)
464464
filter = self._pack_pks_expr(schema_dict, ids)
465465

466466
if not output_fields:
@@ -687,7 +687,7 @@ def get(
687687
return []
688688

689689
conn = self._get_connection()
690-
schema_dict, _ = conn._get_schema_from_cache_or_remote(collection_name, timeout=timeout)
690+
schema_dict, _ = conn._get_schema(collection_name, timeout=timeout)
691691

692692
if not output_fields:
693693
output_fields = ["*"]
@@ -763,7 +763,7 @@ def delete(
763763
expr = ""
764764
conn = self._get_connection()
765765
if len(pks) > 0:
766-
schema_dict, _ = conn._get_schema_from_cache_or_remote(collection_name, timeout=timeout)
766+
schema_dict, _ = conn._get_schema(collection_name, timeout=timeout)
767767
expr = self._pack_pks_expr(schema_dict, pks)
768768
else:
769769
if not isinstance(filter, str):

0 commit comments

Comments
 (0)