Updating expunge deletes allowed from to – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when Elasticsearch tries to update the “expunge_deletes_allowed” setting, which controls the percentage of deleted documents that can be present before a merge is forced. This error can be due to an invalid value or a problem with the Elasticsearch cluster. To resolve this, ensure that the value for “expunge_deletes_allowed” is within the valid range (0-100). If the problem persists, check the health of your Elasticsearch cluster and ensure that all nodes are functioning properly. Also, ensure that the cluster has sufficient resources to perform the merge operation.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” updating [expunge_deletes_allowed] from [{}] to [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, merge and shard.

Log Context

Log “updating [expunge_deletes_allowed] from [{}] to [{}]” classname is MergePolicyConfig.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

     
Override
    public void onRefreshSettings(Settings settings) {
        final double oldExpungeDeletesPctAllowed = mergePolicy.getForceMergeDeletesPctAllowed();
        final double expungeDeletesPctAllowed = settings.getAsDouble(INDEX_MERGE_POLICY_EXPUNGE_DELETES_ALLOWED; oldExpungeDeletesPctAllowed);
        if (expungeDeletesPctAllowed != oldExpungeDeletesPctAllowed) {
            logger.info("updating [expunge_deletes_allowed] from [{}] to [{}]"; oldExpungeDeletesPctAllowed; expungeDeletesPctAllowed);
            mergePolicy.setForceMergeDeletesPctAllowed(expungeDeletesPctAllowed);
        }

        final double oldFloorSegmentMB = mergePolicy.getFloorSegmentMB();
        final ByteSizeValue floorSegment = settings.getAsBytesSize(INDEX_MERGE_POLICY_FLOOR_SEGMENT; null);



 

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?