Cannot add another snapshot to this repository as it – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.11-7.13

Briefly, this error occurs when you try to add a new snapshot to an Elasticsearch repository that is already processing a snapshot. Elasticsearch allows only one snapshot process at a time per repository. To resolve this issue, you can either wait for the current snapshot process to complete or cancel the ongoing snapshot process. Alternatively, you can create a new repository and add the snapshot there.

This guide will help you check for common problems that cause the log ” Cannot add another snapshot to this repository as it ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: repositories, snapshot, blobstore, repository.

Log Context

Log “Cannot add another snapshot to this repository as it” class name is BlobStoreRepository.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 final StepListener repoDataListener = new StepListener<>();
 getRepositoryData(repoDataListener);
 repoDataListener.whenComplete(existingRepositoryData -> {
 final int existingSnapshotCount = existingRepositoryData.getSnapshotIds().size();
 if (existingSnapshotCount >= maxSnapshotCount) {
 listener.onFailure(new RepositoryException(metadata.name(); "Cannot add another snapshot to this repository as it " +
 "already contains [" + existingSnapshotCount + "] snapshots and is configured to hold up to [" + maxSnapshotCount +
 "] snapshots only."));
 return;
 }

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?