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
waitCount++;
        }
        if (request.waitForNodes().isEmpty() == false) {
            waitCount++;
        }
        if (CollectionUtils.isEmpty(request.indices()) == false) { 
            waitCount++;
        }
        return waitCount;
    }
    private boolean validateRequest(final ClusterHealthRequest request, ClusterState clusterState, final int waitCount) {
        ClusterHealthResponse response = clusterHealth(
            request,
            clusterState,
            clusterService.getMasterService().numberOfPendingTasks(),
            allocationService.getNumberOfInFlightFetches(),
            clusterService.getMasterService().getMaxTaskWaitTime()
        );
        return prepareResponse(request, response, clusterState, indexNameExpressionResolver) == waitCount;
    }
    private enum TimeoutState {
        OK,
        TIMED_OUT,
        ZERO_TIMEOUT
    }
    private void sendResponse(
        final CancellableTask task,
        final ClusterHealthRequest request,
        final ClusterState clusterState,
        final int waitFor,