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
* updates all of the handler state, including the keys produced by the non cluster state transforms. The new reserved
     * state version isn't written to the cluster state until the cluster state task runs.
     *
     * Package private for testing
     */
    void executeNonStateTransformationSteps(
        List<Consumer<ActionListener<NonStateTransformResult>>> nonStateTransforms,
        ActionListener<Collection<NonStateTransformResult>> listener
    ) {
        
        if (nonStateTransforms.isEmpty()) {
            listener.onResponse(List.of());
            return;
        }
        GroupedActionListener<NonStateTransformResult> postTasksListener = new GroupedActionListener<>(new ActionListener<>() {
            @Override
            public void onResponse(Collection<NonStateTransformResult> updateKeyTaskResult) {
                listener.onResponse(updateKeyTaskResult);
            }
            @Override
            public void onFailure(Exception e) {
                listener.onFailure(e);
            }
        }, nonStateTransforms.size());
        for (var transform : nonStateTransforms) {
            
            
            
            transform.accept(postTasksListener);
        }