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/test/java/org/elasticsearch/cluster/coordination/JoinValidationServiceTests.java
});
            transportService.acceptIncomingRequests();
            final var otherNodes = new DiscoveryNode[between(1, 10)];
            for (int i = 0; i < otherNodes.length; i++) {
                otherNodes[i] = DiscoveryNodeUtils.create("other-" + i);
                final var connectionListener = new PlainActionFuture<Releasable>();
                transportService.connectToNode(otherNodes[i], connectionListener);
                releasables.add(connectionListener.get(10, TimeUnit.SECONDS));
            }
            final var threads = new Thread[between(1, 3)];
            final var startBarrier = new CyclicBarrier(threads.length + 1);
            final var permitCount = 100; 
            final var validationPermits = new Semaphore(permitCount);
            final var expectFailures = new AtomicBoolean(false);
            final var keepGoing = new AtomicBoolean(true);
            for (int i = 0; i < threads.length; i++) {
                final var seed = randomLong();
                threads[i] = new Thread(() -> {
                    final var random = new Random(seed);
                    try {
                        startBarrier.await(10, TimeUnit.SECONDS);
                    } catch (Exception e) {
                        throw new AssertionError(e);
                    }
                    while (keepGoing.get()) {
                        Thread.yield();
                        if (validationPermits.tryAcquire()) {
                            joinValidationService.validateJoin(
                                randomFrom(random, otherNodes),
                                ActionListener.notifyOnce(new ActionListener<>() {