-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Node deprecation warning for indexes and component templates with sou… #120387
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
Conversation
…rce mode in mapping
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
martijnvg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I don't think we need to do a deprecation for _source.mode for indices.
| List<String> indexes = new ArrayList<>(); | ||
| for (String indexName : clusterState.metadata().getIndices().keySet()) { | ||
| IndexMetadata indexMetadata = clusterState.metadata().getIndices().get(indexName); | ||
| if (SourceFieldMapper.onOrAfterDeprecateModeVersion(indexMetadata.getCreationVersion())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to emit warnings for _source.mode mapping attribute usage in indices, because these are not actionable. The source mode can't be changed after the index has been created. This is different for templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that create index api will return emit a deprecation warning if _source.mode mapping attribute is used. This is visible as response header and in the deprecation log file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, ptal.
...gin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java
Outdated
Show resolved
Hide resolved
martijnvg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
elastic#120387) * Node deprecation warning for indexes and component templates with source mode in mapping * remove index warnings * restrict to component templates * refine (cherry picked from commit 110b206) # Conflicts: # x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java
…th sou… (#120387) (#120493) * Node deprecation warning for indexes and component templates with sou… (#120387) * Node deprecation warning for indexes and component templates with source mode in mapping * remove index warnings * restrict to component templates * refine (cherry picked from commit 110b206) # Conflicts: # x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java * [CI] Auto commit changes from spotless * fix compilation error --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Related to #119993