private Flow executeFromLock(ConfigNodeProcedureEnv env) {
    LOGGER.info("DropPipePluginProcedure: executeFromLock({})", pluginName);

    final PipeTaskCoordinator pipeTaskCoordinator =
        env.getConfigManager().getPipeManager().getPipeTaskCoordinator();
    final PipePluginCoordinator pipePluginCoordinator =
        env.getConfigManager().getPipeManager().getPipePluginCoordinator();
    final SubscriptionCoordinator subscriptionCoordinator =
        env.getConfigManager().getSubscriptionManager().getSubscriptionCoordinator();

    final AtomicReference<PipeTaskInfo> pipeTaskInfo = pipeTaskCoordinator.lock();
    pipePluginCoordinator.lock();
    SubscriptionInfo subscriptionInfo = subscriptionCoordinator.getSubscriptionInfo();

    try {
      if (pipePluginCoordinator
          .getPipePluginInfo()
          .validateBeforeDroppingPipePlugin(pluginName, isSetIfExistsCondition)) {
        LOGGER.info(
            "Pipe plugin {} is not exist, end the DropPipePluginProcedure({})",
            pluginName,
            pluginName);
        pipePluginCoordinator.unlock();
        pipeTaskCoordinator.unlock();
        return Flow.NO_MORE_STATE;
      }

      pipeTaskInfo.get().validatePipePluginUsageByPipe(pluginName);
      subscriptionInfo.validatePipePluginUsageByTopic(pluginName);
    } catch (PipeException e) {
      // if the pipe plugin is a built-in plugin, we should not drop it
      LOGGER.warn(e.getMessage());
      pipePluginCoordinator.unlock();
      pipeTaskCoordinator.unlock();
      setFailure(new ProcedureException(e.getMessage()));
      return Flow.NO_MORE_STATE;
    }

    try {
      env.getConfigManager().getConsensusManager().write(new DropPipePluginPlan(pluginName));
    } catch (ConsensusException e) {
      LOGGER.warn("Failed in the write API executing the consensus layer due to: ", e);
    }
    setNextState(DropPipePluginState.DROP_ON_DATA_NODES);
    return Flow.HAS_MORE_STATE;
  }
This class extends {@link AbstractNodeProcedure} to make sure that when a {@link
DropPipePluginProcedure} 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/DropPipePluginProcedure.java