private void broadcastLatestRegionPriorityMap() {
    // Broadcast the RegionRouteMap to all DataNodes except the unknown ones
    Map<Integer, TDataNodeLocation> dataNodeLocationMap =
        getNodeManager()
            .filterDataNodeThroughStatus(
                NodeStatus.Running, NodeStatus.Removing, NodeStatus.ReadOnly)
            .stream()
            .map(TDataNodeConfiguration::getLocation)
            .collect(Collectors.toMap(TDataNodeLocation::getDataNodeId, location -> location));

    long broadcastTime = System.currentTimeMillis();
    Map<TConsensusGroupId, TRegionReplicaSet> tmpPriorityMap = getRegionPriorityMap();
    DataNodeAsyncRequestContext<TRegionRouteReq, TSStatus> clientHandler =
        new DataNodeAsyncRequestContext<>(
            CnToDnAsyncRequestType.UPDATE_REGION_ROUTE_MAP,
            new TRegionRouteReq(broadcastTime, tmpPriorityMap),
            dataNodeLocationMap);
    CnToDnInternalServiceAsyncRequestManager.getInstance().sendAsyncRequestWithRetry(clientHandler);
  }
Balance cluster RegionGroup route priority through configured algorithm.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RouteBalancer.java