Today the `ReservedClusterStateService` decides whether or not to submit an update-error task depending on the content of the last-applied state as exposed by `ClusterService#state()`. This may happen concurrently with another state being published, so does not give a fully consistent view of the latest state. Instead it should check the state within the cluster state task executor, triggering a no-op update as appropriate.
server/src/main/java/org/elasticsearch/reservedstate/service/ReservedClusterStateService.java
TrialRunResult trialRun(
        String namespace,
        ClusterState currentState,
        ReservedStateChunk stateChunk,
        LinkedHashSet<String> orderedHandlers
    ) {
        ReservedStateMetadata existingMetadata = currentState.metadata().reservedStateMetadata().get(namespace);
        Map<String, Object> reservedState = stateChunk.state();
        List<String> errors = new ArrayList<>();
        List<Consumer<ActionListener<NonStateTransformResult>>> nonStateTransforms = new ArrayList<>();
        ClusterState state = currentState;
        for (var handlerName : orderedHandlers) {
            ReservedClusterStateHandler<?> handler = handlers.get(handlerName);
            try {
                Set<String> existingKeys = keysForHandler(existingMetadata, handlerName);
                TransformState transformState = handler.transform(reservedState.get(handlerName), new TransformState(state, existingKeys));
                state = transformState.state();
                if (transformState.nonStateTransform() != null) {
                    nonStateTransforms.add(transformState.nonStateTransform());
                }
            } catch (Exception e) {
                errors.add(format("Error processing %s state change: %s", handler.name(), stackTrace(e)));
            }
        }
        return new TrialRunResult(nonStateTransforms, errors);
    }
    /**
     * Runs the non cluster state transformations asynchronously, collecting the {@link NonStateTransformResult} objects.
     * <p>
     * Once all non cluster state transformations have completed, we submit the cluster state update task, which