Policy Policy execution complete – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.5-8.9

Briefly, this error occurs when an Elasticsearch policy has finished executing. It’s not an error message but an informational message indicating that a specific policy (like an index lifecycle management policy) has completed its execution. If you’re seeing unexpected results, check the policy’s configuration and the state of your indices. To resolve, you may need to adjust your policy settings, re-run the policy, or investigate further if there are underlying issues with your indices.

This guide will help you check for common problems that cause the log ” Policy [{}]: Policy execution complete ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “Policy [{}]: Policy execution complete” classname is EnrichPolicyRunner.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        if (indices.length > 0) {
            aliasToggleRequest.addAliasAction(IndicesAliasesRequest.AliasActions.remove().indices(indices).alias(enrichIndexBase));
        }
        aliasToggleRequest.addAliasAction(IndicesAliasesRequest.AliasActions.add().index(destinationIndexName).alias(enrichIndexBase));
        enrichOriginClient().admin().indices().aliases(aliasToggleRequest; listener.delegateFailure((l; r) -> {
            logger.info("Policy [{}]: Policy execution complete"; policyName);
            ExecuteEnrichPolicyStatus completeStatus = new ExecuteEnrichPolicyStatus(ExecuteEnrichPolicyStatus.PolicyPhases.COMPLETE);
            task.setStatus(completeStatus);
            l.onResponse(completeStatus);
        }));
    }

 

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?