public void handleUpdatedHostInfo(NodeInfo node, HostInfo hostInfo, boolean aggregateErrorReports) {
        if ( ! node.isDistributor()) return;

        final int hostVersion;
        if (hostInfo.getClusterStateVersionOrNull() == null) {
            // TODO: Consider logging a warning in the future (>5.36).
            // For now, a missing cluster state version probably means the content
            // node has not been updated yet.
            return;
        } else {
            hostVersion = hostInfo.getClusterStateVersionOrNull();
        }
        int currentStateVersion = clusterState.getVersion();

        if (aggregateErrorReports) {
            var errorStats = StorageNodeStatsBridge.generateErrors(node.getNodeIndex(), hostInfo.getDistributor());
            // Error statistics are always updated, even if the node has not ACKed the latest cluster
            // state version. Otherwise, we will never be able to observe errors that prevent convergence!
            statsAggregator.updateErrorStatsFromDistributor(node.getNodeIndex(), errorStats);
        } else {
            // If there's an edge for disabling aggregation, clear out any existing statistics.
            // No-op if already disabled.
            statsAggregator.clearAllErrorStatsFromDistributors();
        }

        if (hostVersion != currentStateVersion) {
            // The distributor may be old (null), or the distributor may not have updated
            // to the latest state version just yet. We log here with fine, because it may
            // also be a symptom of something wrong.
            log.log(Level.FINE, () -> "Current state version is " + currentStateVersion +
                    ", while host info received from distributor " + node.getNodeIndex() +
                    " is " + hostVersion);
            return;
        }

        var stats = StorageNodeStatsBridge.generate(hostInfo.getDistributor());
        statsAggregator.updateForDistributor(node.getNodeIndex(), stats);
    }
Returns the set of nodes that are up for a given node type. Non-private for testing.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateView.java