The current build is a snapshot feature flag is enabled – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.8-8.9

Briefly, this error occurs when the Elasticsearch instance is running a snapshot build, which is a pre-release version, and the feature flag for snapshot builds is enabled. This could lead to instability or unexpected behavior. To resolve this issue, you can either disable the snapshot feature flag or switch to a stable release of Elasticsearch. If you’re testing new features, consider setting up a separate testing environment. Always ensure to backup your data before making any changes to prevent data loss.

This guide will help you check for common problems that cause the log ” The current build is a snapshot; feature flag [{}] is enabled ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .

Log Context

Log “The current build is a snapshot; feature flag [{}] is enabled” classname is FeatureFlag.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            if (enabled == false) {
                throw new IllegalArgumentException(
                    "Feature flag " + name + " (via system property '" + propertyName + "') cannot be disabled in snapshot builds"
                );
            }
            logger.info("The current build is a snapshot; feature flag [{}] is enabled"; name);
        } else {
            enabled = parseSystemProperty(getSystemProperty; propertyName; false);
            logger.debug("The current build is a not snapshot; feature flag [{}] is {}"; name; enabled ? "enabled" : "disabled");
        }
    }

 

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?