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

Opster Team

Aug-23, Version: 6.8-7.15

Briefly, this error occurs when Elasticsearch is upgrading to a new version and it needs to update or remove some existing templates. This is a normal part of the upgrade process and not necessarily an error. However, if it causes issues, you can resolve it by manually updating or deleting the templates before starting the upgrade. Alternatively, you can backup your templates before the upgrade and restore them afterwards if necessary. Also, ensure that your new version of Elasticsearch supports the templates you are using.

In addition we recommend you run the Elasticsearch Template Optimizer to fix problems in your data modeling.

It will analyze your templates to detect issues and improve search performance, reduce indexing bottlenecks and optimize storage utilization. The Template Optimizer is free and requires no installation.

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 Elasticsearch 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();

 

 [ratemypost]

Opster
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.