private Flow executeFromLock(ConfigNodeProcedureEnv env) {
    LOGGER.info("CreatePipePluginProcedure: executeFromLock({})", pipePluginMeta.getPluginName());
    final PipePluginCoordinator pipePluginCoordinator =
        env.getConfigManager().getPipeManager().getPipePluginCoordinator();

    pipePluginCoordinator.lock();
    final String pluginName = pipePluginMeta.getPluginName();

    try {
      if (pipePluginCoordinator
          .getPipePluginInfo()
          .validateBeforeCreatingPipePlugin(pluginName, isSetIfNotExistsCondition)) {
        LOGGER.info(
            "Pipe plugin {} is already created and isSetIfNotExistsCondition is true, end the CreatePipePluginProcedure({})",
            pluginName,
            pluginName);
        pipePluginCoordinator.unlock();
        return Flow.NO_MORE_STATE;
      }
    } catch (PipeException e) {
      // The pipe plugin has already created, we should end the procedure
      LOGGER.warn(
          "Pipe plugin {} is already created, end the CreatePipePluginProcedure({})",
          pluginName,
          pluginName);
      setFailure(new ProcedureException(e.getMessage()));
      pipePluginCoordinator.unlock();
      return Flow.NO_MORE_STATE;
    }

    setNextState(CreatePipePluginState.CREATE_ON_CONFIG_NODES);
    return Flow.HAS_MORE_STATE;
  }
This class extends {@link AbstractNodeProcedure} to make sure that when a {@link
CreatePipePluginProcedure} is executed, the {@link AddConfigNodeProcedure}, {@link
RemoveConfigNodeProcedure} or {@link RemoveDataNodesProcedure} will not be executed at the same
time.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/plugin/CreatePipePluginProcedure.java