docstr: target: test delete after compact
  method: 1.delete half and compact
          2.load and query
          3.delete and query
  expected: Verify deleted ids
docstr_tok: ["target",":","test","delete","after","compact","method",":","1.delete","half","and","compact","2.load","and","query","3.delete","and","query","expected",":","Verify","deleted","ids"]
code: def test_compact_and_delete(self):
      """
      target: test delete after compact
      method: 1.delete half and compact
              2.load and query
              3.delete and query
      expected: Verify deleted ids
      """
      # init collection with one shard, insert into two segments
      collection_w = self.collection_insert_multi_segments_one_shard(
          prefix, is_dup=False
      )
      collection_w.create_index(
          ct.default_float_vec_field_name, ct.default_index
      )
      log.debug(collection_w.index())
      # compact and complete
      collection_w.compact()
      collection_w.wait_for_compaction_completed()
      collection_w.get_compaction_plans(
          check_task=CheckTasks.check_merge_compact
      )
  
      # delete and query
      expr = f"{ct.default_int64_field_name} in {[0]}"
      collection_w.delete(expr)
      collection_w.load()
      collection_w.query(expr, check_task=CheckTasks.check_query_empty)
  
      expr_1 = f"{ct.default_int64_field_name} in {[1]}"
      collection_w.query(
          expr_1,
          check_task=CheckTasks.check_query_results,
          check_items={"exp_res": [{"int64": 1}]},
      )
  
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 19 for calling the TestCompactionOperation obj's underlying member method code with example usage: obj.test_compact_and_delete() without return types