-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Profiling] Don't map new fields by default #96876
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
[Profiling] Don't map new fields by default #96876
Conversation
With this commit we set the mapping parameter `dynamic` to `false` for all profiling-related indices / index templates. Previously we were relying on the default behavior which would have mapped new fields dynamically. This is problematic for schema evolution. With this change we will still accept documents with additional fields but they will not be automatically added to the mappings.
|
Pinging @elastic/profiling (Team:Universal Profiling) |
| "_source": { | ||
| "enabled": false | ||
| }, | ||
| "dynamic": false, |
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.
Metrics are dynamically mapped currently, so if we switch this we'd also need to modify the mapping to explicitly add them.
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.
As discussed offline let's make an exception for profiling-metrics as the current mapping makes sense and it's a datastream, meaning that old data would age eventually anyway. I'll revert the change for this 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.
Addressed in fa15b6e.
christos68k
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
With this commit we set the mapping parameter
dynamictofalsefor all profiling-related indices / index templates. Previously we were relying on the default behavior which would have mapped new fields dynamically. This is problematic for schema evolution. With this change we will still accept documents with additional fields but they will not be automatically added to the mappings.