Closed
Conversation
8171a26 to
f6989ba
Compare
With only one type, the default mapping has become useless. The approach in this commit is to reject mapping updates that try to update the `_default` type regardless of the index creation version, and to ignore `_default_` mappings when recovering indices from a 6.x index. In the corner case that an empty 6.x index needs to be upgraded and this index only has a `_default_` mapping, then the `_default_` mapping will be renamed to `_doc`, which is the hardcoded mapping name in 7.0.
dfe8ec0 to
35ce44c
Compare
jimczi
approved these changes
Jan 24, 2018
| // new types all at once , which can create a false error. | ||
|
|
||
| // For example in MapperService we can't distinguish between a create index api call | ||
| // and a put mapping api call, so we don't which type did exist before. |
Contributor
There was a problem hiding this comment.
nit: s/we don't/we don't know/
Contributor
|
I find the approach chosen here to patch the cluster state problematic, as it leads to inconsistent views across 6.x / 7.x nodes. My suggestion is therefore to not fully remove default in 7.x just yet:
|
jpountz
added a commit
to jpountz/elasticsearch
that referenced
this pull request
Mar 20, 2018
This will reject mapping updates to the `_default_` mapping with 7.x indices and still emit a deprecation warning with 6.x indices. Relates elastic#15613 Supersedes elastic#28248
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With only one type, the default mapping has become useless. The approach in
this commit is to reject mapping updates that try to update the
_defaulttype regardless of the index creation version, and to ignore
_default_mappings when recovering indices from a 6.x index. In the corner case that
an empty 6.x index needs to be upgraded and this index only has a
_default_mapping, then the_default_mapping will be renamed to_doc,which is the hardcoded mapping name in 7.0.
I need reviews especially on the cluster-state processing side of the PR to know
whether the approach I took in order to dynamically remove default mappings
when processing mappings is ok.