public void removeDataNodePersistence(List<TDataNodeLocation> removedDataNodes) {
    // Remove consensus record
    try {
      configManager.getConsensusManager().write(new RemoveDataNodePlan(removedDataNodes));
    } catch (ConsensusException e) {
      LOGGER.warn("Failed in the write API executing the consensus layer due to: ", e);
    }

    // Adjust maxRegionGroupNum
    configManager.getClusterSchemaManager().adjustMaxRegionGroupNum();

    // Remove metrics
    for (TDataNodeLocation dataNodeLocation : removedDataNodes) {
      PartitionMetrics.unbindDataNodePartitionMetricsWhenUpdate(
          MetricService.getInstance(),
          NodeUrlUtils.convertTEndPointUrl(dataNodeLocation.getClientRpcEndPoint()));
    }
  }
Removes a batch of DataNodes from the node information.

@param removedDataNodes the list of DataNodeLocations to be removed
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java