Skip to content
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

Template priority to be int or max value a long #82665

Open
gemaliano opened this issue Jan 17, 2022 · 2 comments
Open

Template priority to be int or max value a long #82665

gemaliano opened this issue Jan 17, 2022 · 2 comments
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team

Comments

@gemaliano
Copy link
Contributor

Elasticsearch version (bin/elasticsearch --version): 7.16.2

Steps to reproduce:

When running GET _cat/templates?v we see some templates with priority 2147483647

.watch-history-13                         [.watcher-history-13*]       2147483647        13      []
.ml-state                                 [.ml-state*]                 2147483647        7160299 []
ilm-history                               [ilm-history-5*]             2147483647        5       []
.slm-history                              [.slm-history-5*]            2147483647        5       []
.ml-anomalies-                            [.ml-anomalies-*]            2147483647        7160299 []
.ml-notifications-000002                  [.ml-notifications-000002]   2147483647        7160299 []
.ml-stats                                 [.ml-stats-*]                2147483647        7160299 []

Priority is a long value so we are able to override the template using higher value than 2147483647 (which is the max int value).
We are not supposed to override these templates, so ideally we should have priority an int or priority value to be max long.

@gemaliano gemaliano added >bug needs:triage Requires assignment of a team area label labels Jan 17, 2022
@romseygeek romseygeek added the :Data Management/Indices APIs APIs to create and manage indices and templates label Jan 18, 2022
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Jan 18, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@romseygeek romseygeek removed the needs:triage Requires assignment of a team area label label Jan 18, 2022
@dakrone
Copy link
Member

dakrone commented Jan 19, 2022

I believe this was historically because legacy templates used an int for the order (which roughly maps onto the composable index template's priority), so it used to be the maximum it can be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests

4 participants