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

Optimize IndexLifecycleMetadata#getPolicies #116988

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

joegallo
Copy link
Contributor

@joegallo joegallo commented Nov 18, 2024

IndexLifecycleMetadata#getPolicies is (edit: well, 'was') called in a loop in IndexTemplateRegistry#addIndexLifecyclePoliciesIfMissing on every cluster state change -- given that the contents of the map are entirely deterministic and can be pre-calculated at IndexLifecycleMetadata construction time, it seemed simple enough to just do that.

@joegallo joegallo added >refactoring :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team auto-backport Automatically create backport pull requests when merged v9.0.0 v8.17.0 labels Nov 18, 2024
@joegallo joegallo requested a review from masseyke November 18, 2024 21:01
@elasticsearchmachine
Copy link
Collaborator

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

@joegallo
Copy link
Contributor Author

In some sense, this is a follow up to #115347.

Copy link
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joegallo joegallo merged commit 1cf22ee into elastic:main Nov 19, 2024
16 checks passed
@joegallo joegallo deleted the optimize-index-template-registry branch November 19, 2024 14:49
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

joegallo added a commit to joegallo/elasticsearch that referenced this pull request Nov 19, 2024
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Nov 20, 2024
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Data Management/ILM+SLM Index and Snapshot lifecycle management >refactoring Team:Data Management Meta label for data/management team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants