Attempting to remove non-existent snapshots from repository data – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.8-8.9

Briefly, this error occurs when Elasticsearch tries to delete snapshots that do not exist in the specified repository. This could be due to a miscommunication or a synchronization issue between nodes. To resolve this, you can first verify the existence of the snapshot by using the GET snapshot API. If the snapshot doesn’t exist, you can ignore the error. If it does exist, try to delete it again. If the error persists, check the health of your nodes and ensure they are properly synchronized.

This guide will help you check for common problems that cause the log ” Attempting to remove non-existent snapshots {} from repository data ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: repository, repositories.

Log Context

Log “Attempting to remove non-existent snapshots {} from repository data” class name is RepositoryData.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 .filter(Predicate.not(snapshots::contains))
 .collect(Collectors.toMap(SnapshotId::getUUID; Function.identity()));
 if (newSnapshotIds.size() != snapshotIds.size() - snapshots.size()) {
 final Collection notFound = new HashSet<>(snapshots);
 notFound.removeAll(snapshotIds.values());
 throw new ResourceNotFoundException("Attempting to remove non-existent snapshots {} from repository data"; notFound);
 }
 final Map newSnapshotsDetails = new HashMap<>(snapshotsDetails);
 for (SnapshotId snapshotId : snapshots) {
 newSnapshotsDetails.remove(snapshotId.getUUID());
 }

 

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?