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/ReservedStateUpdateTask.java
logger.debug("Error processing state change request for [{}] with the following errors [{}]", namespace, errors);
            var errorState = new ErrorState(
                namespace,
                reservedStateVersion.version(),
                errors,
                ReservedStateErrorMetadata.ErrorKind.VALIDATION
            );
            errorReporter.accept(currentState, errorState);
            throw new IllegalStateException("Error processing state change request for " + namespace + ", errors: " + errorState);
        }
    }
    static Set<String> keysForHandler(ReservedStateMetadata reservedStateMetadata, String handlerName) {
        if (reservedStateMetadata == null || reservedStateMetadata.handlers().get(handlerName) == null) {
            return Collections.emptySet();
        }
        return reservedStateMetadata.handlers().get(handlerName).keys();
    }
    static boolean checkMetadataVersion(
        String namespace,
        ReservedStateMetadata existingMetadata,
        ReservedStateVersion reservedStateVersion
    ) {
        if (Version.CURRENT.before(reservedStateVersion.minCompatibleVersion())) {
            logger.warn(
                () -> format(
                    "Reserved cluster state version [%s] for namespace [%s] is not compatible with this Elasticsearch node",
                    reservedStateVersion.minCompatibleVersion(),
                    namespace
                )
            );