-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] experimental toggles for doc-value-only #149131
[Fleet] experimental toggles for doc-value-only #149131
Conversation
@juliaElastic should we look at experimental feature when we install the package as we do for synthetic or tsdb so the experimental feature is keeped after a package upgrade? |
@nchaulet yeah, I think that piece is missing, I didn't have a chance to test the package upgrade scenario yet EDIT: this is done, added the logic to the package install flow as well.
|
doc_value_only_numeric: { type: 'boolean' }, | ||
doc_value_only_other: { type: 'boolean' }, |
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.
We're trying to limit mapping additions to what's strictly necessary. Sometimes, developers aren't aware that defining your field in mappings is only required if you need to query against them. Rest of the time, using dynamic: false
is sufficient.
So I need to ask: are these new properties used for querying? Is there any value defining them in the mappings?
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 think we don't need to query on these fields. @joshdover @ruflin Could you confirm?
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 can't think of any reason we'd be querying on these right now in the application.
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.
@pgayvallet updated with 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.
++. If we ever have to query on it, we could use a runtime as the total number of these docs will be reasonable small.
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
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.
Code LGTM, one question though
The logic also reads the package spec's template and preserves the index:false values regardless of the switch (tested manually by setting @timestamp field to index:false in the template, there is also the original field in logs-system.auth@package stream that is set to index:false in the package by default.
Should the switch be toggle-able at all if index: false
is present in the package spec, or should it be in a disabled state with a tooltip?
@@ -0,0 +1,65 @@ | |||
/* |
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.
Thanks for creating this separate module to organize these helper utilities.
So the switch refers to all numeric (or other) type fields in the package spec, while |
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 🚀
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
Closes #144357
WIP. Review can be started, but still requires a lot of testing and fixing the issue below.
How to test locally:
experimentalDataStreamSettings
feature flaglogs-system.auth@package
index:false
on all numeric field mappings (long, double, etc.)index:false
on all other field type mappings that support it (keyword, ip, date, etc.)What works:
index:false
values regardless of the switch (tested manually by setting@timestamp
field toindex:false
in the template, there is also theoriginal
field inlogs-system.auth@package
stream that is set toindex:false
in the package by default.Pending:
doc-value-only
for "other" types (keyword, date, etc.). Could be that one of the fields doesn't supportindex:false
setting. Didn't experience this when turning on only the numeric types. - FIXEDEDIT: found the root cause of this:
Caused by: java.lang.IllegalArgumentException: data stream timestamp field [@timestamp] is not indexed
Checklist
Delete any items that are not applicable to this PR.