https://github.com/elastic/elasticsearch/pull/97304 removes several places that might do an expensive rebuild of the cluster state via `getStateForMasterService`. There's one other call we should be able to remove, in `JoinValidationService`, but it's a little tricky since we rely on seeing the last-accepted state for the cluster UUID validation, and it's not obviously ok to expose the last-accepted state without the no-master block.

This is a fairly minor issue because we do not do this join validation during elections, only if we're the elected master, and in that case `getStateForMasterService` is cheap. But that's not guaranteed, and we should strengthen this to avoid the that expensive step whenever possible.
server/src/main/java/org/elasticsearch/cluster/coordination/JoinValidationService.java
/*
     * IMPLEMENTATION NOTES
     *
     * This component is based around a queue of actions which are processed in a single-threaded fashion on the CLUSTER_COORDINATION
     * threadpool. The actions are either:
     *
     * - send a join validation request to a particular node, or
     * - clear the cache
     *
     * The single-threadedness is arranged by tracking (a lower bound on) the size of the queue in a separate AtomicInteger, and only
     * spawning a new processor when the tracked queue size changes from 0 to 1.
     *
     * The executeRefs ref counter is necessary to handle the possibility of a concurrent shutdown, ensuring that the cache is always
     * cleared even if validateJoin is called concurrently to the shutdown.
     */
    private static final Logger logger = LogManager.getLogger(JoinValidationService.class);
    public static final String JOIN_VALIDATE_ACTION_NAME = "internal:cluster/coordination/join/validate";
    
    public static final Setting<TimeValue> JOIN_VALIDATION_CACHE_TIMEOUT_SETTING = Setting.timeSetting(
        "cluster.join_validation.cache_timeout",
        TimeValue.timeValueSeconds(60),
        TimeValue.timeValueMillis(1),
        Setting.Property.NodeScope
    );
    private static final TransportRequestOptions REQUEST_OPTIONS = TransportRequestOptions.of(null, TransportRequestOptions.Type.STATE);