mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Update delete compact case assert to wait auto compaction (#23740)
Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
This commit is contained in:
parent
5cd21893c8
commit
09c555d35d
@ -236,7 +236,15 @@ class TestCompactionParams(TestcaseBase):
|
||||
|
||||
# Flush a new segment and meet condition 20% deleted entities, triggre compaction but no way to get plan
|
||||
collection_w.insert(cf.gen_default_dataframe_data(1, start=tmp_nb))
|
||||
assert collection_w.num_entities == tmp_nb + 1
|
||||
|
||||
exp_num_entities_after_compact = tmp_nb - (tmp_nb // ct.compact_delta_ratio_reciprocal) + 1
|
||||
start = time()
|
||||
while True:
|
||||
if collection_w.num_entities == exp_num_entities_after_compact:
|
||||
break
|
||||
if time() - start > 60:
|
||||
raise MilvusException(1, "Auto delete ratio compaction cost more than 60s")
|
||||
sleep(1)
|
||||
|
||||
collection_w.create_index(ct.default_float_vec_field_name, index_params=ct.default_flat_index)
|
||||
collection_w.load()
|
||||
|
||||
@ -387,7 +387,7 @@ class TestDeleteOperation(TestcaseBase):
|
||||
# delete half and flush
|
||||
expr = f'{ct.default_int64_field_name} in {insert_res.primary_keys[:ct.default_nb // 2]}'
|
||||
del_res, _ = collection_w.delete(expr)
|
||||
assert collection_w.num_entities == ct.default_nb
|
||||
assert collection_w.num_entities in [ct.default_nb, ct.default_nb // 2]
|
||||
|
||||
# create index
|
||||
index_params = {"index_type": "IVF_SQ8",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user