In https://github.com/elastic/elasticsearch/pull/90621 we moved most usages of the cluster health API onto a `MANAGEMENT` thread because it's too expensive to run on `SAME` in a large cluster. However, if the request includes any `wait_for_*` option then we set up a cluster state observer, which supplies its responses on the cluster applier thread. We need to fork those computations onto a `MANAGEMENT` thread too.
server/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java
}
        String[] concreteIndices;
        try {
            concreteIndices = indexNameExpressionResolver.concreteIndexNames(clusterState, request);
        } catch (IndexNotFoundException e) {
            
            ClusterHealthResponse response = new ClusterHealthResponse(
                clusterState.getClusterName().value(),
                Strings.EMPTY_ARRAY,
                clusterState,
                numberOfPendingTasks,
                numberOfInFlightFetch,
                UnassignedInfo.getNumberOfDelayedUnassigned(clusterState),
                pendingTaskTimeInQueue
            );
            response.setStatus(ClusterHealthStatus.RED);
            return response;
        }
        return new ClusterHealthResponse(
            clusterState.getClusterName().value(),
            concreteIndices,
            clusterState,
            numberOfPendingTasks,
            numberOfInFlightFetch,
            UnassignedInfo.getNumberOfDelayedUnassigned(clusterState),
            pendingTaskTimeInQueue
        );
    }
}