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

Opster Team

Aug-23, Version: 1-2.9

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 OpenSearch operation.

Briefly, this error occurs when OpenSearch is attempting to upgrade the segments of an index but finds no “ancient” segments that need upgrading. Segments are the underlying structures of an index and sometimes need upgrading when OpenSearch is updated. To resolve this, ensure you’re running the latest version of OpenSearch and that your indices are properly optimized. If the error persists, consider reindexing your data. Also, check your OpenSearch logs for any related issues that might be causing this error.

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 OpenSearch concepts: index, upgrade.

Log Context

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

        OpenSearchMergePolicy mp = (OpenSearchMergePolicy) 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?

Get expert answers on Elasticsearch/OpenSearch