Skip to content

Commit ad94cc7

Browse files
pymilvus-botjac0626silas.jiang
authored
[Backport 2.6] fix:remove some old function calls after refactor schema cache (#3197) (#3198)
Backport of #3197 to `2.6`. Signed-off-by: silas.jiang <silas.jiang@zilliz.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: jac <jacllovey@qq.com> Co-authored-by: silas.jiang <silas.jiang@zilliz.com>
1 parent 0ec532b commit ad94cc7

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
@@ -436,9 +436,7 @@ async def query(
436436

437437
if ids:
438438
try:
439-
schema_dict, _ = await conn._get_schema_from_cache_or_remote(
440-
collection_name, timeout=timeout
441-
)
439+
schema_dict, _ = await conn._get_schema(collection_name, timeout=timeout)
442440
except Exception as ex:
443441
raise ex from ex
444442
filter = self._pack_pks_expr(schema_dict, ids)
@@ -473,9 +471,7 @@ async def get(
473471

474472
conn = self._get_connection()
475473
try:
476-
schema_dict, _ = await conn._get_schema_from_cache_or_remote(
477-
collection_name, timeout=timeout
478-
)
474+
schema_dict, _ = await conn._get_schema(collection_name, timeout=timeout)
479475
except Exception as ex:
480476
raise ex from ex
481477

@@ -531,9 +527,7 @@ async def delete(
531527
conn = self._get_connection()
532528
if len(pks) > 0:
533529
try:
534-
schema_dict, _ = await conn._get_schema_from_cache_or_remote(
535-
collection_name, timeout=timeout
536-
)
530+
schema_dict, _ = await conn._get_schema(collection_name, timeout=timeout)
537531
except Exception as ex:
538532
raise ex from ex
539533
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
@@ -458,7 +458,7 @@ def query(
458458
conn = self._get_connection()
459459

460460
if ids:
461-
schema_dict, _ = conn._get_schema_from_cache_or_remote(collection_name, timeout=timeout)
461+
schema_dict, _ = conn._get_schema(collection_name, timeout=timeout)
462462
filter = self._pack_pks_expr(schema_dict, ids)
463463

464464
if not output_fields:
@@ -685,7 +685,7 @@ def get(
685685
return []
686686

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

690690
if not output_fields:
691691
output_fields = ["*"]
@@ -761,7 +761,7 @@ def delete(
761761
expr = ""
762762
conn = self._get_connection()
763763
if len(pks) > 0:
764-
schema_dict, _ = conn._get_schema_from_cache_or_remote(collection_name, timeout=timeout)
764+
schema_dict, _ = conn._get_schema(collection_name, timeout=timeout)
765765
expr = self._pack_pks_expr(schema_dict, pks)
766766
else:
767767
if not isinstance(filter, str):

0 commit comments

Comments
 (0)