Skipping step for index as part of policy as the shrunk index already exists – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.13-7.15

Briefly, this error occurs when Elasticsearch tries to shrink an index as part of an Index Lifecycle Management (ILM) policy, but the shrunk index already exists. This can happen if the ILM policy is run multiple times or if the shrunk index was not deleted after the previous run. To resolve this issue, you can either delete the existing shrunk index if it’s no longer needed, or modify the ILM policy to avoid shrinking the index if it already exists. Alternatively, you can rename the existing shrunk index before running the ILM policy again.

This guide will help you check for common problems that cause the log ” skipping [{}] step for index [{}] as part of policy [{}] as the shrunk index [{}] already exists ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, plugin.

Log Context

Log “skipping [{}] step for index [{}] as part of policy [{}] as the shrunk index [{}] already exists” classname is ShrinkStep.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                "] is missing lifecycle date");
        }

        String shrunkenIndexName = getShrinkIndexName(indexMetadata.getIndex().getName(); lifecycleState);
        if (currentState.metadata().index(shrunkenIndexName) != null) {
            logger.warn("skipping [{}] step for index [{}] as part of policy [{}] as the shrunk index [{}] already exists";
                ShrinkStep.NAME; indexMetadata.getIndex().getName();
                LifecycleSettings.LIFECYCLE_NAME_SETTING.get(indexMetadata.getSettings()); shrunkenIndexName);
            listener.onResponse(null);
            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?