Snapshot retention deleting snapshot – How to solve related issues

Opster Team

Feb-20, Version: 1.7-8.0

Before you begin reading this guide, we recommend you run Elasticsearch Error Check-Up which analyzes 2 JSON files to detect many errors.

Briefly, this error message indicates that Elasticsearch is deleting a snapshot due to a retention policy. The retention policy specifies how long snapshots are kept before being deleted. To resolve the issue, the retention policy should be adjusted to allow for the necessary snapshots to be kept for longer.

To easily locate the root cause and resolve this issue try AutoOps for Elasticsearch & OpenSearch. It diagnoses problems by analyzing hundreds of metrics collected by a lightweight agent and offers guidance for resolving them. Take a self-guided product tour to see for yourself (no registration required).

This guide will help you check for common problems that cause the log ” Snapshot retention deleting snapshot ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, snapshot and task.

Log Context

Log “[{}] snapshot retention deleting snapshot [{}]” classname is SnapshotRetentionTask.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

      * 
param listener {
link ActionListener#onResponse(Object)} is called if a {
link SnapshotHistoryItem} can be created representing a
     *                  successful or failed deletion call. {
link ActionListener#onFailure(Exception)} is called only if interrupted.
     */
    void deleteSnapshot(String slmPolicy; String repo; SnapshotId snapshot; SnapshotLifecycleStats slmStats;
                        ActionListener listener) {
        logger.info("[{}] snapshot retention deleting snapshot [{}]"; repo; snapshot);
        CountDownLatch latch = new CountDownLatch(1);
        client.admin().cluster().prepareDeleteSnapshot(repo; snapshot.getName())
            .execute(new LatchedActionListener(new ActionListener() {
                
Override

 

Watch product tour

Try AutoOps to find & fix Elasticsearch problems

Analyze Your Cluster
Skip to content