public void broadcastDataNodeStatusChange(List<TDataNodeLocation> dataNodes) {
    String dataNodesString =
        dataNodes.stream()
            .map(RegionMaintainHandler::getIdWithRpcEndpoint)
            .collect(Collectors.joining(", "));
    LOGGER.info(
        "{}, BroadcastDataNodeStatusChange start, dataNode: {}",
        REMOVE_DATANODE_PROCESS,
        dataNodesString);

    List<TDataNodeConfiguration> otherOnlineDataNodes =
        configManager.getNodeManager().filterDataNodeThroughStatus(NodeStatus.Running).stream()
            .filter(node -> !dataNodes.contains(node.getLocation()))
            .collect(Collectors.toList());

    DataNodeAsyncRequestContext<TCleanDataNodeCacheReq, TSStatus> cleanDataNodeCacheContext =
        new DataNodeAsyncRequestContext<>(CnToDnAsyncRequestType.CLEAN_DATA_NODE_CACHE);

    for (TDataNodeConfiguration node : otherOnlineDataNodes) {
      TCleanDataNodeCacheReq disableReq = new TCleanDataNodeCacheReq(dataNodes);
      cleanDataNodeCacheContext.putRequest(node.getLocation().getDataNodeId(), disableReq);
      cleanDataNodeCacheContext.putNodeLocation(
          node.getLocation().getDataNodeId(), node.getLocation());
    }

    CnToDnInternalServiceAsyncRequestManager.getInstance()
        .sendAsyncRequestWithRetry(cleanDataNodeCacheContext);

    for (Map.Entry<Integer, TSStatus> entry :
        cleanDataNodeCacheContext.getResponseMap().entrySet()) {
      if (!isSucceed(entry.getValue())) {
        LOGGER.error(
            "{}, BroadcastDataNodeStatusChange meets error, status change dataNodes: {}, error datanode: {}",
            REMOVE_DATANODE_PROCESS,
            dataNodesString,
            entry.getValue());
        return;
      }
    }

    LOGGER.info(
        "{}, BroadcastDataNodeStatusChange finished, dataNode: {}",
        REMOVE_DATANODE_PROCESS,
        dataNodesString);
  }
Broadcasts DataNodes' status change, preventing disabled DataNodes from accepting read or write
requests.

@param dataNodes the list of DataNodes that require broadcast status changes
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java