Managed index as part of policy is a shrunk index and the source index does not exist – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.13-7.15

Briefly, this error occurs when an index lifecycle management (ILM) policy is trying to shrink an index, but the source index no longer exists. This could be due to accidental deletion or renaming of the source index. To resolve this issue, you can either recreate the source index if it was deleted accidentally, or update the ILM policy to point to the correct source index if it was renamed. Alternatively, you can remove the shrink action from the ILM policy if it’s no longer needed.

This guide will help you check for common problems that cause the log ” managed index [{}] as part of policy [{}] is a shrunk index and the source index [{}] does not exist ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, plugin, source.

Log Context

Log “managed index [{}] as part of policy [{}] is a shrunk index and the source index [{}] does not exist ” classname is CleanupShrinkIndexStep.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            // the current managed index is a shrunk index
            if (currentClusterState.metadata().index(shrunkenIndexSource) == null) {
                // if the source index does not exist; we'll skip deleting the
                // (managed) shrunk index as that will cause data loss
                String policyName = LifecycleSettings.LIFECYCLE_NAME_SETTING.get(indexMetadata.getSettings());
                logger.warn("managed index [{}] as part of policy [{}] is a shrunk index and the source index [{}] does not exist " +
                    "anymore. will skip the [{}] step"; indexMetadata.getIndex().getName(); policyName; shrunkenIndexSource; NAME);
                listener.onResponse(null);
                return;
            }
        }

 

 [ratemypost]