Starting template upgrade to version templates will be updated and will be removed – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 1-1.1

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 version of your index templates. This process involves updating some templates and removing others. To resolve this issue, ensure that you have a backup of your current templates before the upgrade. If there are templates that you don’t want to be removed, you can manually update them to the new version. Also, check the OpenSearch logs for any specific errors related to the template upgrade process. Lastly, ensure that your OpenSearch cluster has sufficient resources to handle the upgrade process.

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 template upgrade to version {}; {} templates will be updated and {} will be removed ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: cluster, upgrade, template, version, metadata.

Log Context

Log “Starting template upgrade to version {}; {} templates will be updated and {} will be removed” classname is TemplateUpgradeService.java.
We extracted the following from OpenSearch source code for those seeking an in-depth context :

        lastTemplateMetadata = templates;
        Optional; Set>> changes = calculateTemplateChanges(templates);
        if (changes.isPresent()) {
            if (upgradesInProgress.compareAndSet(0; changes.get().v1().size() + changes.get().v2().size() + 1)) {
                logger.info("Starting template upgrade to version {}; {} templates will be updated and {} will be removed";
                    Version.CURRENT;
                    changes.get().v1().size();
                    changes.get().v2().size());

                assert threadPool.getThreadContext().isSystemContext();

 

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