A later version may be incompatible with some configurations in an earlier version. If you do not modify these configurations before a version upgrade, your services may be affected after the upgrade. Therefore, before the upgrade, you must check for incompatible configurations and modify the configurations as required. This topic describes the manual checks that you must perform and the automatic check items before an upgrade from V5.6.16 to V6.3.2. It also provides the methods that can be used to modify the incompatible configurations.
Background information
- Before a version upgrade, a precheck is performed. You must identify incompatible configurations based on the precheck results and modify the configurations as required. For more information, see Upgrade the version of a cluster.
- The commands provided in this topic can be executed in the Kibana console. For more information about how to log on to the Kibana console, see Log on to the Kibana console.
Perform manual checks
Automatic check items
Before you upgrade the version of your cluster, you must click Precheck to check the cluster. For more information, see Upgrade the version of a cluster. Then, the system performs a compatibility check based on the following table.
No. | Configuration level | Category | Parameter |
---|---|---|---|
1 | Cluster | Snapshot settings | cluster.routing.allocation.snapshot.relocation_enabled |
2 | Storage throttling settings | indices.store.throttle.type and indices.store.throttle.max_bytes_per_sec | |
3 | Index | Similarity settings | index.similarity.base |
4 | Shadow replica settings | index.shared_filesystem and index.shadow_replicas | |
5 | Index storage settings | index.store.type | |
6 | Storage throttling settings | index.store.throttle.type and index.store.throttle.max_bytes_per_sec | |
7 | include_in_all setting in the mappings configuration of an index | include_in_all Note The indexes that are created before an upgrade from V5.X to V6.X and have this parameter
configured can still be used after the upgrade. The indexes that are created after
the upgrade do not support this parameter.
|
|
8 | Version settings for index creation | index.version.created Note This parameter specifies that indexes cannot be upgraded across major versions. For
example, you cannot directly upgrade the indexes created in V5.X to V7.X. Before an
upgrade from V5.X to V7.X, you must call the reindex operation to migrate data in
the indexes to a V7.X cluster. Then, delete the indexes from the V5.X cluster and
upgrade the version of the V5.X cluster.
|
|
9 | Index template | Similarity settings | index.similarity.base |
10 | Shadow replica settings | index.shared_filesystem and index.shadow_replicas | |
11 | Index storage settings | index.store.type | |
12 | Storage throttling settings | index.store.throttle.type and index.store.throttle.max_bytes_per_sec | |
13 | include_in_all setting in the mappings configuration of the index template | include_in_all | |
14 | _all setting in the mappings configuration of the index template | _all | |
15 | Type settings in the mappings configuration of the index template | None
Note Check whether the mappings configuration in the index template contains multiple type
settings.
|
Modify incompatible configurations
- Cluster-level incompatible configurations
For cluster-level incompatible configurations, you can disable the configurations.
Configuration category Command to disable the configuration Snapshot settings PUT _cluster/settings { "persistent": { "cluster.routing.allocation.snapshot.relocation_enabled": null }, "transient": { "cluster.routing.allocation.snapshot.relocation_enabled": null } }
Storage throttling settings PUT _cluster/settings { "persistent": { "indices.store.throttle.type": null, "indices.store.throttle.max_bytes_per_sec": null }, "transient": { "indices.store.throttle.type": null, "indices.store.throttle.max_bytes_per_sec": null } }
- Index-level incompatible configurations
For index-level incompatible configurations, you can disable the configurations.
Configuration category Command to disable the configuration Additional information Similarity settings PUT test_index/_settings { "index.similarity.base.*": null }
These configurations can be modified only after indexes are closed. You cannot read data from or write data to closed indexes. After the modifications, you can open the indexes. The following example shows how to open and close the test_index index: - Close the index
POST test_index/_close
- Open the index
POST test_index/_open
Shadow replica settings PUT test_index/_settings { "index.shared_filesystem": null, "index.shadow_replicas": null }
Index storage settings PUT test_index/_settings { "index.store.type": null }
Storage throttling settings PUT test_index/_settings { "settings": { "index.store.throttle.type": null, "index.store.throttle.max_bytes_per_sec": null } }
None. Note Indexes that have the include_in_all parameter configured can still be used in the later version. You do not need to modify this parameter. - Close the index
- Index template-level incompatible configurations
The following example shows how to modify configurations in the test_template index template:
- Run the
GET _template/test_template
command to query the test_template index template.The query result shows that the index template contains the following incompatible configurations: index storage settings, _all, and include_in_all.
{ "test_template": { "order": 0, "template": "test_*", "settings": { "index": { "store": { "throttle": { "max_bytes_per_sec": "100m" } } } }, "mappings": { "test_type": { "_all": { "enabled": true }, "properties": { "test_field": { "type": "text", "include_in_all": true } } } }, "aliases": {} } }
- Delete the incompatible configurations and run the
PUT _template/test_template
command to update the index template.PUT _template/test_template { "order": 0, "template": "test_*", "settings": { }, "mappings": { "test_type": { "properties": { "test_field": { "type": "text" } } } }, "aliases": {} }
- Run the