-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fields randomly reordered when updating Elasticsearch templates #29420
Comments
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Hi! We're labeling this issue as |
👍 still relevant AFAIK |
Can you help us understand the impact in more detail so we know how to prioritize this? Is this a nice to have performance optimization? Or is this actively causing incidents? |
We haven't had any escalations about this for a while (a year or so I reckon) so this seems more of a nice-to-have at this stage. |
Hi! We're labeling this issue as |
As per elastic/elasticsearch#74501 (comment) Elasticsearch considers the order of fields in a mapping defined in an index template to be important. This means that if a Beat puts a template that differs from the existing template only by reordering the JSON then Elasticsearch will treat it as a genuine template update and not a no-op. However we believe that Beats don't fix the order of fields when updating the template, and different instances may put templates with different field orders. This means Beats may cause many unnecessary cluster state updates when creating templates.
#24332 likely means that this isn't a big deal in most cases any more, but it's still a problem if Beats are configured to overwrite templates at startup.
(In fact Elasticsearch treats the order of properties in every JSON object within the mapping to be important. It's not just about the fields)
Please could we fix the order of JSON object properties when creating templates? If you don't care about the order then sorting them alphabetically would be fine.
The text was updated successfully, but these errors were encountered: