mirror of https://github.com/milvus-io/milvus.git
parent
3f3953e00b
commit
dce31b473e
|
@ -1024,97 +1024,6 @@ class TestCollectionSearch(TestcaseBase):
|
|||
"limit": limit - deleted_entity_num,
|
||||
"_async": _async})
|
||||
|
||||
# @pytest.mark.tags(CaseLabel.L1)
|
||||
# @pytest.mark.skip("https://github.com/milvus-io/milvus/issues/13118")
|
||||
# def test_search_partition_after_release_one(self, nq, dim, auto_id, _async):
|
||||
# """
|
||||
# target: test search function before and after release
|
||||
# method: 1. search the collection
|
||||
# 2. release a partition
|
||||
# 3. search the collection
|
||||
# expected: the deleted entities should not be searched
|
||||
# """
|
||||
# # 1. initialize with data
|
||||
# nb = 1000
|
||||
# limit = 1000
|
||||
# partition_num = 1
|
||||
# collection_w, _, _, insert_ids = self.init_collection_general(prefix, True, nb,
|
||||
# partition_num,
|
||||
# auto_id=auto_id,
|
||||
# dim=dim)[0:4]
|
||||
# # 2. search all the partitions before partition deletion
|
||||
# vectors = [[random.random() for _ in range(dim)] for _ in range(nq)]
|
||||
# log.info("test_search_partition_after_release_one: searching before deleting partitions")
|
||||
# collection_w.search(vectors[:nq], default_search_field,
|
||||
# default_search_params, limit,
|
||||
# default_search_exp, _async=_async,
|
||||
# check_task=CheckTasks.check_search_results,
|
||||
# check_items={"nq": nq,
|
||||
# "ids": insert_ids,
|
||||
# "limit": limit,
|
||||
# "_async": _async})
|
||||
# # 3. release one partition
|
||||
# log.info("test_search_partition_after_release_one: releasing a partition")
|
||||
# par = collection_w.partitions
|
||||
# deleted_entity_num = par[partition_num].num_entities
|
||||
# entity_num = nb - deleted_entity_num
|
||||
# conn = self.connection_wrap.get_connection()[0]
|
||||
# conn.release_partitions(collection_w.name, [par[partition_num].name])
|
||||
# log.info("test_search_partition_after_release_one: released a partition")
|
||||
# # 4. search collection after release one partition
|
||||
# log.info("test_search_partition_after_release_one: searching after deleting partitions")
|
||||
# collection_w.search(vectors[:nq], default_search_field,
|
||||
# default_search_params, limit,
|
||||
# default_search_exp, _async=_async,
|
||||
# check_task=CheckTasks.check_search_results,
|
||||
# check_items={"nq": nq,
|
||||
# "ids": insert_ids[:entity_num],
|
||||
# "limit": limit - deleted_entity_num,
|
||||
# "_async": _async})
|
||||
|
||||
# @pytest.mark.tags(CaseLabel.L2)
|
||||
# @pytest.mark.skip("https://github.com/milvus-io/milvus/issues/13118")
|
||||
# def test_search_partition_after_release_all(self, nq, dim, auto_id, _async):
|
||||
# """
|
||||
# target: test search function before and after release
|
||||
# method: 1. search the collection
|
||||
# 2. release all partitions
|
||||
# 3. search the collection
|
||||
# expected: 0 entity should be searched
|
||||
# """
|
||||
# # 1. initialize with data
|
||||
# nb = 1000
|
||||
# limit = 1000
|
||||
# collection_w, _, _, insert_ids = self.init_collection_general(prefix, True, nb,
|
||||
# 1, auto_id=auto_id,
|
||||
# dim=dim)[0:4]
|
||||
# # 2. search all the partitions before partition deletion
|
||||
# vectors = [[random.random() for _ in range(dim)] for _ in range(nq)]
|
||||
# log.info("test_search_partition_after_release_all: searching before deleting partitions")
|
||||
# collection_w.search(vectors[:nq], default_search_field,
|
||||
# default_search_params, limit,
|
||||
# default_search_exp, _async=_async,
|
||||
# check_task=CheckTasks.check_search_results,
|
||||
# check_items={"nq": nq,
|
||||
# "ids": insert_ids,
|
||||
# "limit": limit,
|
||||
# "_async": _async})
|
||||
# # 3. release all partitions
|
||||
# log.info("test_search_partition_after_release_all: releasing a partition")
|
||||
# par = collection_w.partitions
|
||||
# conn = self.connection_wrap.get_connection()[0]
|
||||
# conn.release_partitions(collection_w.name, [par[0].name, par[1].name])
|
||||
# log.info("test_search_partition_after_release_all: released a partition")
|
||||
# # 4. search collection after release all partitions
|
||||
# collection_w.search(vectors[:nq], default_search_field,
|
||||
# default_search_params, limit,
|
||||
# default_search_exp, _async=_async,
|
||||
# check_task=CheckTasks.check_search_results,
|
||||
# check_items={"nq": nq,
|
||||
# "ids": [],
|
||||
# "limit": 0,
|
||||
# "_async": _async})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
def test_search_collection_after_release_load(self, nb, nq, dim, auto_id, _async):
|
||||
"""
|
||||
|
@ -1147,56 +1056,6 @@ class TestCollectionSearch(TestcaseBase):
|
|||
"limit": default_limit,
|
||||
"_async": _async})
|
||||
|
||||
# @pytest.mark.tags(CaseLabel.L2)
|
||||
# @pytest.mark.xfail(reason="issue 6997")
|
||||
# @pytest.mark.skip("https://github.com/milvus-io/milvus/issues/13118")
|
||||
# def test_search_partition_after_release_load(self, nb, nq, dim, auto_id, _async):
|
||||
# """
|
||||
# target: search the pre-released collection after load
|
||||
# method: 1. create collection
|
||||
# 2. release a partition
|
||||
# 3. load partition
|
||||
# 4. search the pre-released partition
|
||||
# expected: search successfully
|
||||
# """
|
||||
# # 1. initialize without data
|
||||
# collection_w, _, _, insert_ids, time_stamp = self.init_collection_general(prefix, True, nb,
|
||||
# 1, auto_id=auto_id,
|
||||
# dim=dim)[0:5]
|
||||
# # 2. release collection
|
||||
# log.info("test_search_partition_after_release_load: releasing a partition")
|
||||
# par = collection_w.partitions
|
||||
# conn = self.connection_wrap.get_connection()[0]
|
||||
# conn.release_partitions(collection_w.name, [par[1].name])
|
||||
# log.info("test_search_partition_after_release_load: released a partition")
|
||||
# # 3. Search the collection after load
|
||||
# limit = 1000
|
||||
# collection_w.load()
|
||||
# log.info("test_search_partition_after_release_load: searching after load")
|
||||
# vectors = [[random.random() for _ in range(dim)] for _ in range(nq)]
|
||||
# collection_w.search(vectors[:nq], default_search_field, default_search_params,
|
||||
# limit, default_search_exp, _async=_async,
|
||||
# travel_timestamp=time_stamp,
|
||||
# check_task=CheckTasks.check_search_results,
|
||||
# check_items={"nq": nq,
|
||||
# "ids": insert_ids,
|
||||
# "limit": limit,
|
||||
# "_async": _async})
|
||||
# # 4. Search the pre-released partition after load
|
||||
# if limit > par[1].num_entities:
|
||||
# limit_check = par[1].num_entities
|
||||
# else:
|
||||
# limit_check = limit
|
||||
# collection_w.search(vectors[:nq], default_search_field, default_search_params,
|
||||
# limit, default_search_exp,
|
||||
# [par[1].name], _async=_async,
|
||||
# travel_timestamp=time_stamp,
|
||||
# check_task=CheckTasks.check_search_results,
|
||||
# check_items={"nq": nq,
|
||||
# "ids": insert_ids[par[0].num_entities:],
|
||||
# "limit": limit_check,
|
||||
# "_async": _async})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
def test_search_load_flush_load(self, nb, nq, dim, auto_id, _async):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue