Package org.opensearch.cluster.metadata
Class MetadataIndexUpgradeService
java.lang.Object
org.opensearch.cluster.metadata.MetadataIndexUpgradeService
This service is responsible for upgrading legacy index metadata to the current version
Every time an existing index is introduced into cluster this service should be used to upgrade the existing index metadata to the latest version of the cluster. It typically occurs during cluster upgrade, when dangling indices are imported into the cluster or indices are restored from a repository.
- Opensearch.internal:
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataIndexUpgradeService
(Settings settings, org.opensearch.common.xcontent.NamedXContentRegistry xContentRegistry, MapperRegistry mapperRegistry, IndexScopedSettings indexScopedSettings, SystemIndices systemIndices, ScriptService scriptService) -
Method Summary
Modifier and TypeMethodDescriptionupgradeIndexMetadata
(IndexMetadata indexMetadata, Version minimumIndexCompatibilityVersion) Checks that the index can be upgraded to the current version of the cluster-manager node.
-
Constructor Details
-
MetadataIndexUpgradeService
public MetadataIndexUpgradeService(Settings settings, org.opensearch.common.xcontent.NamedXContentRegistry xContentRegistry, MapperRegistry mapperRegistry, IndexScopedSettings indexScopedSettings, SystemIndices systemIndices, ScriptService scriptService)
-
-
Method Details
-
upgradeIndexMetadata
public IndexMetadata upgradeIndexMetadata(IndexMetadata indexMetadata, Version minimumIndexCompatibilityVersion) Checks that the index can be upgraded to the current version of the cluster-manager node.If the index does not need upgrade it returns the index metadata unchanged, otherwise it returns a modified index metadata. If index cannot be updated the method throws an exception.
-