Today if we detect concurrent modification of a snapshot repository then we mark it with `CORRUPTED_REPO_GEN` which blocks further writes to try and prevent additional damage to its contents. You can remove the marker by calling the register-repository API again, but this API will discard no-op re-registrations without taking any action. You can work around this by unregistering the repository first (which may be impossible if it's still in use for searchable snapshots) or by re-registering it with some trivial setting change (which seems hacky).

We should not consider it a no-op re-registration if the repository is currently marked with `CORRUPTED_REPO_GEN`, because doing this re-registration will re-read the repo contents and clear the corruption marker and therefore is not a no-op.
server/src/main/java/org/elasticsearch/repositories/RepositoriesService.java
IOUtils.closeWhileHandlingException(repository);
            logger.warn(() -> format("failed to create repository [%s][%s]", repositoryMetadata.type(), repositoryMetadata.name()), e);
            throw new RepositoryException(repositoryMetadata.name(), "failed to create repository", e);
        }
    }
    private static Repository throwRepositoryTypeDoesNotExists(RepositoryMetadata repositoryMetadata) {
        throw new RepositoryException(repositoryMetadata.name(), "repository type [" + repositoryMetadata.type() + "] does not exist");
    }
    private static Repository createUnknownTypeRepository(RepositoryMetadata repositoryMetadata) {
        logger.warn(
            "[{}] repository type [{}] is unknown; ensure that all required plugins are installed on this node",
            repositoryMetadata.name(),
            repositoryMetadata.type()
        );
        return new UnknownTypeRepository(repositoryMetadata);
    }
    public static void validateRepositoryName(final String repositoryName) {
        if (Strings.hasLength(repositoryName) == false) {
            throw new RepositoryException(repositoryName, "cannot be empty");
        }
        if (repositoryName.contains("#")) {
            throw new RepositoryException(repositoryName, "must not contain '#'");
        }
        if (Strings.validFileName(repositoryName) == false) {
            throw new RepositoryException(repositoryName, "must not contain the following characters " + Strings.INVALID_FILENAME_CHARS);
        }
    }
    private static void ensureRepositoryNotInUse(ClusterState clusterState, String repository) {
        final SnapshotsInProgress snapshots = clusterState.custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY);
        if (snapshots.forRepo(repository).isEmpty() == false) {