Starting segment upgrade upgradeOnlyAncientSegments= – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.17

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 is attempting to upgrade old segments in the index that are using an outdated format. This is a part of Elasticsearch’s internal maintenance process and usually doesn’t require any user intervention. However, if it’s causing issues, you can try to manually force a merge of the index segments, or if the index is not needed, you can delete it. If the problem persists, consider reindexing your data into a new index with the latest version of Elasticsearch.

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 ” starting segment upgrade upgradeOnlyAncientSegments={} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, upgrade.

Log Context

Log “starting segment upgrade upgradeOnlyAncientSegments={}” classname is InternalEngine.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        ElasticsearchMergePolicy mp = (ElasticsearchMergePolicy) indexWriter.getConfig().getMergePolicy();
        optimizeLock.lock();
        try {
            ensureOpen();
            if (upgrade) {
                logger.info("starting segment upgrade upgradeOnlyAncientSegments={}"; upgradeOnlyAncientSegments);
                mp.setUpgradeInProgress(true; upgradeOnlyAncientSegments);
            }
            store.incRef(); // increment the ref just to ensure nobody closes the store while we optimize
            try {
                if (onlyExpungeDeletes) {

 

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?