public TSStatus dropPipe(TDropPipeReq req) {
    final String pipeName = req.getPipeName();
    final boolean isSetIfExistsCondition =
        req.isSetIfExistsCondition() && req.isIfExistsCondition();
    if (!pipeTaskInfo.isPipeExisted(pipeName, req.isTableModel)) {
      return isSetIfExistsCondition
          ? RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS)
          : RpcUtils.getStatus(
              TSStatusCode.PIPE_NOT_EXIST_ERROR,
              String.format(
                  "Failed to drop pipe %s. Failures: %s does not exist.", pipeName, pipeName));
    }
    final TSStatus status;
    if (pipeName.startsWith(PipeStaticMeta.CONSENSUS_PIPE_PREFIX)) {
      status = configManager.getProcedureManager().dropConsensusPipe(pipeName);
    } else {
      status = configManager.getProcedureManager().dropPipe(pipeName);
    }
    if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
      LOGGER.warn("Failed to drop pipe {}. Result status: {}.", pipeName, status);
    }
    return status;
  }
Caller should ensure that the method is called in the lock {@link #lock()}.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/task/PipeTaskCoordinator.java