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/Coordinator.java
Setting.Property.NodeScope
    );
    public static final Setting<TimeValue> SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING = Setting.timeSetting(
        "cluster.discovery_configuration_check.interval",
        TimeValue.timeValueMillis(30000),
        TimeValue.timeValueMillis(1),
        Setting.Property.NodeScope
    );
    public static final String COMMIT_STATE_ACTION_NAME = "internal:cluster/coordination/commit_state";
    private final Settings settings;
    private final boolean singleNodeDiscovery;
    private final ElectionStrategy electionStrategy;
    private final TransportService transportService;
    private final MasterService masterService;
    private final AllocationService allocationService;
    private final JoinHelper joinHelper;
    private final JoinValidationService joinValidationService;
    private final MasterServiceTaskQueue<NodeLeftExecutor.Task> nodeLeftQueue;
    private final Supplier<CoordinationState.PersistedState> persistedStateSupplier;
    private final NoMasterBlockService noMasterBlockService;
    final Object mutex = new Object(); 
    private final SetOnce<CoordinationState> coordinationState = new SetOnce<>(); 
    private volatile ClusterState applierState; 
    private final PeerFinder peerFinder;
    private final PreVoteCollector preVoteCollector;
    private final Random random;
    private final ElectionSchedulerFactory electionSchedulerFactory;
    private final SeedHostsResolver configuredHostsResolver;
    private final TimeValue publishTimeout;
    private final TimeValue publishInfoTimeout;