public TSStatus handleLeaderChange(final PipeHandleLeaderChangePlan plan) {
    try {
      pipeTaskInfo.handleLeaderChange(plan);

      final List<PipeMeta> pipeMetaListFromCoordinator = new ArrayList<>();
      for (final PipeMeta pipeMeta : pipeTaskInfo.getPipeMetaList()) {
        pipeMetaListFromCoordinator.add(pipeMeta);
      }
      PipeConfigNodeAgent.task().handlePipeMetaChanges(pipeMetaListFromCoordinator);
      PipeTemporaryMetaInCoordinatorMetrics.getInstance()
          .handleTemporaryMetaChanges(pipeTaskInfo.getPipeMetaList());
      return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
    } catch (final Exception e) {
      LOGGER.error("Failed to handle leader change", e);
      return new TSStatus(TSStatusCode.PIPE_ERROR.getStatusCode())
          .setMessage("Failed to handle leader change, because " + e.getMessage());
    }
  }
Note: This interface is only used for subscription and thus irrelevant to the {@link
PipeConfigNodeSubtask}. Hence, we can skip the operation of {@link PipeConfigNodeTaskAgent} and
{@link PipeConfigRegionListener} here.

@param plans An {@link OperateMultiplePipesPlanV2} consisting of many subPlans
@return result {@link TSStatus}
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeInfo.java