@Category(ManualIT.class)
  @Test
  public void testConcurrentFlushAndRandomDeletionWithRestart()
      throws InterruptedException, ExecutionException, SQLException {
    int testNum = 23;
    try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
        Statement statement = connection.createStatement()) {
      statement.execute("drop database if exists test");
    }

    AtomicLong writtenPointCounter = new AtomicLong(-1);
    AtomicLong deletedPointCounter = new AtomicLong(0);
    ExecutorService writeDeletionThreadPool = Executors.newCachedThreadPool();
    ExecutorService restartThreadPool = Executors.newCachedThreadPool();
    int fileNumMax = 1000;
    int pointPerFile = 1000;
    int deviceNum = 4;
    Future<Void> writeThread =
        writeDeletionThreadPool.submit(
            () ->
                write(
                    writtenPointCounter,
                    writeDeletionThreadPool,
                    fileNumMax,
                    pointPerFile,
                    deviceNum,
                    testNum,
                    true));
    int deletionRange = 100;
    int minIntervalToRecord = 1000;
    Future<Void> deletionThread =
        writeDeletionThreadPool.submit(
            () ->
                randomDeletion(
                    writtenPointCounter,
                    deletedPointCounter,
                    writeDeletionThreadPool,
                    fileNumMax,
                    pointPerFile,
                    deletionRange,
                    minIntervalToRecord,
                    testNum));
    int restartTargetPointWritten = 100000;
    Future<Void> restartThread =
        restartThreadPool.submit(
            () -> restart(writtenPointCounter, restartTargetPointWritten, writeDeletionThreadPool));
    try {
      writeThread.get();
    } catch (CancellationException ignored) {

    }
    try {
      deletionThread.get();
    } catch (CancellationException ignored) {

    }
    restartThread.get();
    writeDeletionThreadPool.shutdown();
    boolean success = writeDeletionThreadPool.awaitTermination(1, TimeUnit.MINUTES);
    assertTrue(success);

    // test that should be written are written, deleted are deleted
    try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
        Statement statement = connection.createStatement()) {
      statement.execute("USE test");
      try (ResultSet set =
          statement.executeQuery(
              "select count(*) from table"
                  + testNum
                  + " where time < "
                  + writtenPointCounter.get())) {
        assertTrue(set.next());
        assertEquals(writtenPointCounter.get() - deletedPointCounter.get(), set.getLong(1));
      }
    }

    try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
        Statement statement = connection.createStatement()) {
      statement.execute("drop database if exists test");
    }
  }
Should delete this case after the deletion value filter feature be implemented
integration-test/src/test/java/org/apache/iotdb/relational/it/db/it/IoTDBDeletionTableIT.java