-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Add age_in_millis to ILM Explain Response #128866
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
Add age_in_millis to ILM Explain Response #128866
Conversation
Hi @gmjehovich, I've created a changelog YAML for you. |
Hi @gmjehovich, I've updated the changelog YAML for you. |
Pinging @elastic/es-data-management (Team:Data Management) |
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.
Two tiny comments:
1.) There's a comment block ahead that notes that the array of arguments coming into the parsing constructor ignores a few fields -- since this one will be ignored, we should add it to that comment. Look for this section:
// a[13] == "age"
// a[20] == "time_since_index_creation"
// <--- your new thing would go here
2.) You can DRY the getAge(nowSupplier)
call and pull it out as a local final var
-- I realize this is pracitically inconsequential, but it allows the world to know I was here. 😉
Other than that, LGTM!
For the record, I was really flummoxed by how we'd handle disparity between the writer and the reader with a synthetic field like the |
Fix comments; follow DRY for getAge(nowSupplier) call in IndexLifecycleExplainResponse
* Add age_in_millis to ILM Explain Response * Fix: Declare age_in_millis in ILM Explain Response Parser * Add unit tests for age_in_millis field in IndexLifecycleExplainResponse * Update docs/changelog/128866.yaml * Update docs/changelog/128866.yaml * Update IndexLifecycleExplainResponse.java Fix comments; follow DRY for getAge(nowSupplier) call in IndexLifecycleExplainResponse --------- Co-authored-by: Joe Gallo <[email protected]>
* Add age_in_millis to ILM Explain Response * Fix: Declare age_in_millis in ILM Explain Response Parser * Add unit tests for age_in_millis field in IndexLifecycleExplainResponse * Update docs/changelog/128866.yaml * Update docs/changelog/128866.yaml * Update IndexLifecycleExplainResponse.java Fix comments; follow DRY for getAge(nowSupplier) call in IndexLifecycleExplainResponse --------- Co-authored-by: Joe Gallo <[email protected]>
This PR enhances the
_ilm/explain
API by adding anage_in_millis
field to its response.Previously, the index's "age" was only reported in a human-readable format (
age: "1.97d"
).This change introduces the
age_in_millis
field, providing the index's age as a precise millisecond value (e.g.,age_in_millis: 170208000
).This new field is validated with corresponding unit and integration testing
Closes #103659