docstr: target: test delete entities less ratio and no compact
  method: 1.create collection shard_num=1
          2.insert without flush
          3.delete 10% entities and flush
  expected: Verify no compact (can't), delete successfully
docstr_tok: ["target",":","test","delete","entities","less","ratio","and","no","compact","method",":","1.create","collection","shard_num=1","2.insert","without","flush","3.delete","10","%","entities","and","flush","expected",":","Verify","no","compact","(","ca","n't",")",",","delete","successfully"]
code: def test_compact_delete_less_ratio(self):
      """
      target: test delete entities less ratio and no compact
      method: 1.create collection shard_num=1
              2.insert without flush
              3.delete 10% entities and flush
      expected: Verify no compact (can't), delete successfully
      """
      collection_w = self.init_collection_wrap(
          name=cf.gen_unique_str(prefix), shards_num=1
      )
      df = cf.gen_default_dataframe_data(tmp_nb)
      insert_res, _ = collection_w.insert(df)
  
      # delete 10% entities, ratio = 0.1
      less_ratio_reciprocal = 10
      ratio_expr = f"{ct.default_int64_field_name} in {insert_res.primary_keys[:tmp_nb // less_ratio_reciprocal]}"
      collection_w.delete(ratio_expr)
      assert collection_w.num_entities == tmp_nb
  
      collection_w.create_index(
          ct.default_float_vec_field_name,
          index_params=ct.default_flat_index,
      )
      collection_w.load()
      collection_w.query(
          ratio_expr, check_task=CheckTasks.check_query_empty
      )
  
imports: import threading
  from time import time, sleep
  import pytest
  from pymilvus.grpc_gen.common_pb2 import SegmentState
  from pymilvus.exceptions import MilvusException
  from base.client_base import TestcaseBase
  from common import common_func
  from common import common_type
  from common.common_type import CaseLabel, CheckTasks
  from utils.util_log import test_log
label_desc: Use image node_id 9 for calling the TestCompactionParams obj's underlying member method code with example usage: obj.test_compact_delete_less_ratio() without return types