private boolean checkBeforeCreatePipeInternal(final TCreatePipeReq createPipeRequest)
      throws PipeException {
    if (!isPipeExisted(createPipeRequest.getPipeName())) {
      return true;
    }

    if (createPipeRequest.isSetIfNotExistsCondition()
        && createPipeRequest.isIfNotExistsCondition()) {
      return false;
    }

    final String exceptionMessage =
        String.format(
            "Failed to create pipe %s, %s",
            createPipeRequest.getPipeName(), PIPE_ALREADY_EXIST_MSG);
    LOGGER.warn(exceptionMessage);
    throw new PipeException(exceptionMessage);
  }
Caller should ensure that the method is called in the lock {@link #acquireWriteLock}.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeTaskInfo.java