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
var errorState = new ErrorState(
                namespace,
                reservedStateVersion.version(),
                errors,
                ReservedStateErrorMetadata.ErrorKind.VALIDATION
            );
            saveErrorState(currentState, errorState);
            return new IllegalStateException("Error processing state change request for " + namespace + ", errors: " + errorState);
        }
        return null;
    }
    
    static boolean isNewError(ReservedStateMetadata existingMetadata, Long newStateVersion) {
        return (existingMetadata == null
            || existingMetadata.errorMetadata() == null
            || newStateVersion <= 0 
            || existingMetadata.errorMetadata().version() < newStateVersion);
    }
    
    void saveErrorState(ClusterState clusterState, ErrorState errorState) {
        ReservedStateMetadata existingMetadata = clusterState.metadata().reservedStateMetadata().get(errorState.namespace());
        if (isNewError(existingMetadata, errorState.version()) == false) {
            logger.info(
                () -> format(
                    "Not updating error state because version [%s] is less or equal to the last state error version [%s]",
                    errorState.version(),
                    existingMetadata.errorMetadata().version()
                )
            );
            return;