Upgrading composable template for from version to version – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.9-7.15

Briefly, this error occurs when there is an attempt to upgrade a composable template in Elasticsearch from one version to another, but the version details are not specified or are incorrect. To resolve this issue, ensure that the correct version numbers are provided during the upgrade process. Also, verify that the version you’re upgrading to is compatible with your current Elasticsearch setup. If the problem persists, consider reindexing your data or recreating the template with the correct settings.

This guide will help you check for common problems that cause the log ” upgrading composable template [{}] for [{}] from version [{}] to version [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: template, plugin, version.

Log Context

Log “upgrading composable template [{}] for [{}] from version [{}] to version [{}]” classname is IndexTemplateRegistry.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    logger.debug("adding composable template [{}] for [{}]; because it doesn't exist"; templateName; getOrigin());
                    putComposableTemplate(newTemplate; creationCheck);
                } else if (Objects.isNull(currentTemplate.version()) || newTemplate.getVersion() > currentTemplate.version()) {
                    // IndexTemplateConfig now enforces templates contain a `version` property; so if the template doesn't have one we can
                    // safely assume it's an old version of the template.
                    logger.info("upgrading composable template [{}] for [{}] from version [{}] to version [{}]";
                        templateName; getOrigin(); currentTemplate.version(); newTemplate.getVersion());
                    putComposableTemplate(newTemplate; creationCheck);
                } else {
                    creationCheck.set(false);
                    logger.trace("not adding composable template [{}] for [{}]; because it already exists at version [{}]";

 

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?