-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make mapping.single_type
only settable if the index is a 5.x index
#24961
Comments
The |
I don't think it needs to be that complicated we can just use the |
This change skips rest tests that use mutlitple types if the cluster is a pure 6.x cluster. This allows all indics to be created with a version less than 6.0 and that means we can safely use the `mapping.single_type` setting. Relates to elastic#24961
This change skips rest tests that use mutlitple types if the cluster is a pure 6.x cluster. This allows all indics to be created with a version less than 6.0 and that means we can safely use the `mapping.single_type` setting. Relates to #24961
This change cleans up core tests to not use `index.mapping.single_type=false` but instead where applicable use a single type or markt the index as created with a pre 6.x version. Relates to elastic#24961
This change cleans up core tests to not use `index.mapping.single_type=false` but instead where applicable use a single type or markt the index as created with a pre 6.x version. Relates to #24961
* Remove the setting from the yml tests and replace with tests using `join` field. We can't use the setting in yml tests without lots of backflips but we have `ReindexParentChildTests` for the coverage. There weren't tests for `join` field with reindex before this. Adding these tests discovered elastic#25363. * Remove the setting from `ReindexParentChildTests` and replace with `index.version.created=V_5_6_0`. This test can be entirely removed when legacy parent/child support is dropped from core. Relates to elastic#24961
This change cleans up remaining tests to not use index.mapping.single_type=false but instead where applicable use a single type or markt the index as created with a pre 6.x version. Yet, there is still on leftover in the client tests that needs special attention. See `org.elasticsearch.client.SearchIT` Relates to elastic#24961
This change cleans up remaining tests to not use index.mapping.single_type=false but instead where applicable use a single type or markt the index as created with a pre 6.x version. Yet, there is still on leftover in the client tests that needs special attention. See `org.elasticsearch.client.SearchIT` Relates to #24961
In 6.x we prevent multiple types and default to `index.mapping.single_type: false` This change removes the registered setting and ensures that it's preserved for 5.x indices. Relates to elastic#24961
* Remove the setting from the yml tests and replace with tests using `join` field. We can't use the setting in yml tests without lots of backflips but we have `ReindexParentChildTests` for the coverage. There weren't tests for `join` field with reindex before this. Adding these tests discovered #25363. * Remove the setting from `ReindexParentChildTests` and replace with `index.version.created=V_5_6_0`. This test can be entirely removed when legacy parent/child support is dropped from core. * Port the yml tests that set _parent into integ tests so they can set the index created version. These tests can be removed when we drop support for _parent in core. * Port a delete-by-query test for filtering based on type to an `ESIntegTestCase` so it can use `index.version.created=5.6.0` to setup documents of multiple types. This whole feature can be dropped when we no longer support multiple types per index. Relates to #24961
This removes the remaining usage of `mapping.single_type` from the parent join module and moves it's bwc test to the mixed cluster tests Relates to elastic#24961
All tasks done. Thanks everyone |
The Upgrade Assistant in X-Pack doesn't seem to be able to handle this. Index name: .kibana
Required action: reindex
Failed to create index.
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "An internal server error occurred",
"code": "ERR_CREATE_INDEX_FAILED",
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
"reindexedIndexName": ".kibana-6"
} The breaking changes documentation mentions the removed setting
But it doesn't mention how to use the Upgrade Assistant to deal with it. A web search led me here. But where is the right place to report this error? |
Good news. Although I was disappointed that the recommended upgrade path of the Upgrade Assistant's Reindex Helper didn't work (with the error reported above), I was able to successfully upgrade the internal index for Kibana from 5.6 to 6.2 following the manual instructions at https://www.elastic.co/guide/en/kibana/6.2/migrating-6.0-index.html It only took a few seconds. |
mapping.single_type
allows to add multiple types which is something that 6.x indices must not allow. Yet, today this setting is still modifiable while it defaults totrue
In order to move make it only settable on 5.x indices and read-only in 6.0 we need to fix several things like:PercolatorFieldMapperTests
to use a single typePercolatorFieldMapperTests
needs to be rewritten to only use a single type. #24958 / Stop using themapping.single_type
setting in percolator tests. #24963AbstractQueryTestCase
index.mapper.single_type
on 6.x indices Ensureindex.mapping.single_type
can only be set on 5.x indices #25375The text was updated successfully, but these errors were encountered: