Introduce MapperMergeContext#104512
Merged
elasticsearchmachine merged 5 commits intoelastic:mainfrom Jan 18, 2024
Merged
Conversation
Currently, this is basically a noop. This is in preparation for elastic#102936, in an effort to reduce the mechanical changes.
Collaborator
|
Pinging @elastic/es-search (Team:Search) |
2 tasks
javanna
approved these changes
Jan 18, 2024
Contributor
javanna
left a comment
There was a problem hiding this comment.
left two small comments, LGTM otherwise
javanna
reviewed
Jan 18, 2024
Member
Author
|
@elasticmachine update branch |
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jan 23, 2024
This is extracting a piece of independent functionality from #96235 This is the result of this discussion: #96235 (comment) The mapping merge executed on the master node is the only authoritative place where we have a consistent view of the cluster state as it's guaranteed to be executed on a single thread on the master node. Therefore, there can be no race conditions and we exactly know how many fields are left before hitting the field limit. Therefore, this is the best place to add as many fields as possible without going over the limit if `index.mapping.total_fields.ignore_dynamic_beyond_limit` is set to `true` in the index settings. This change makes it possible to limit the number of fields added during mapping merger. However, that feature isn't actually used outside of tests. In #96235, the feature to limit fields during the merge process is used to guarantee that the cluster state update never fails due to dynamic mapping updates that exceed the field limit in case `ignore_dynamic_beyond_limit` is enabled. This works because after each dynamic mapping update, the indexing request gets retried (there's no change to that logic in this or related PRs) so that the document parsing takes the new mapping into account. This only applies to dynamic mapping updates aka auto-updates. When explicitly trying to update the mapping with too many fields, the put mapping operation will still fail, even if `ignore_dynamic_beyond_limit` is enabled. Depends on: - [x] #104512 - [x] #104578
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.
Currently, this is basically a noop.
This is in preparation for #102936, in an effort to reduce the mechanical changes.