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 cannot find a matching version for a specific plugin or component. It then defaults to a pre-set version. This could be due to incorrect version specification or incompatibility issues. To resolve this, ensure that the version of the plugin or component matches the OpenSearch version. If the error persists, consider updating or downgrading the OpenSearch version to match the plugin’s requirements. Alternatively, you may need to find a compatible version of the plugin or component.
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 ” no version match {}; default to {} ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: lucene, version.
Overview
Lucene or Apache Lucene is an open-source Java library used as a search engine. OpenSearch is built on top of Lucene.
OpenSearch converts Lucene into a distributed system/search engine for scaling horizontally. OpenSearch also provides other features like thread-pool, queues, node/cluster monitoring API, data monitoring API, Cluster management, etc. In short, OpenSearch extends Lucene and provides additional features beyond it.
OpenSearch hosts data on data nodes. Each data node hosts one or more indices, and each index is divided into shards with each shard holding part of the index’s data. Each shard created in OpenSearch is a separate Lucene instance or process.
Notes and good things to know
When an index is created in OpenSearch, it is divided into one or more primary shards for scaling the data and splitting it into multiple nodes/instances.
- As each shard is a separate instance of Lucene, creating too many shards will consume unnecessary resources and damage performance.
It takes proper planning to decide the number of primary shards for your index, taking into account the index size, max growth, and the number of data nodes.
- Previous versions of OpenSearch defaulted to creating five shards per index. Starting with 7.0.0, the default is now one shard per index.
Overview
A version corresponds to the OpenSearch built-in tracking system that tracks the changes in each document’s update. When a document is indexed for the first time, it is assigned a version 1 using _version key. When the same document gets a subsequent update, the _version is incremented by 1 with every index, update or delete API call.
What it is used for
A version is used to handle the concurrency issues in OpenSearch which come into play during simultaneous accessing of an index by multiple users. OpenSearch handles this issue with an optimistic locking concept using the _version parameter to avoid letting multiple users edit the same document at the same time and protects users from generating incorrect data.
Notes
You cannot see the history of the document using _version. That means OpenSearch does not use _version to keep track of original changes that had been performed on the document. For example, if a document has been updated 10 times, it’s _version would be marked by OpenSearch as 11, but you cannot go back and see what version 5 of the document looked like. This has to be implemented independently.
Common problems
If optimistic locking is not implemented while making updates to a document, OpenSearch may return a conflict error with the 409 status code, which means that multiple users are trying to update the same version of the document at the same time.
POST /ratings/123?version=50 { "name": "Joker", "rating": 50 }
Log Context
Log “no version match {}; default to {}” classname is Lucene.java.
We extracted the following from OpenSearch source code for those seeking an in-depth context :
return defaultVersion; } try { return Version.parse(version); } catch (ParseException e) { logger.warn(() -> new ParameterizedMessage("no version match {}; default to {}"; version; defaultVersion); e); return defaultVersion; } } /**