-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Avoid unnecessary LifecycleExecutionState recalculation #81558
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
Merged
joegallo
merged 10 commits into
elastic:master
from
joegallo:ilm-lifecycle-execution-state-rework
Jan 14, 2022
Merged
Avoid unnecessary LifecycleExecutionState recalculation #81558
joegallo
merged 10 commits into
elastic:master
from
joegallo:ilm-lifecycle-execution-state-rework
Jan 14, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reimplement fromIndexMetadata on LifecycleExecutionState in terms of the newly created method.
Callers should just use the IndexMetadata getter directly.
Instead, eagerly pre-calculate it when an IndexMetadata is built.
Since the LifecycleExecutionState is already always pre-parsed and available on the IndexMetadata (at build time), there's no longer any efficiency to be gained by ignoring it and diving directly into the underlying customData.
87458fa
to
2e111e4
Compare
Pinging @elastic/es-data-management (Team:Data Management) |
original-brownbear
approved these changes
Jan 14, 2022
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, this took a while to get through in all details but looks like it's all there and working fine still :) Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Data Management/ILM+SLM
Index and Snapshot lifecycle management
>enhancement
Team:Data Management
Meta label for data/management team
v8.0.0-rc2
v8.1.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #77466. Extracted and cleaned up from #79692.
Moves
LifecycleExecutionState
toserver/
so that we can have it as a proper field onIndexMetadata
, and have that field be calculated at build-time rather than (repeatedly) on-demand.