public void waitIfReleasing() {
    synchronized (blockObject) {
      try {
        blockObject.wait(MAX_WAITING_TIME_WHEN_RELEASING);
      } catch (InterruptedException e) {
        logger.warn(
            "Interrupt because the release task and flush task did not finish within {} milliseconds.",
            MAX_WAITING_TIME_WHEN_RELEASING);
        Thread.currentThread().interrupt();
      }
    }
  }
If there is a ReleaseTask or FlushTask, block the current thread to wait up to
MAX_WAITING_TIME_WHEN_RELEASING. The thread will be woken up if the ReleaseTask or FlushTask
ends or the wait time exceeds MAX_WAITING_TIME_WHEN_RELEASING.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/memory/ReleaseFlushMonitor.java