Truncate step_info and error reason in ILM execution state and history#125054
Merged
elasticsearchmachine merged 6 commits intoelastic:mainfrom Mar 18, 2025
Merged
Truncate step_info and error reason in ILM execution state and history#125054elasticsearchmachine merged 6 commits intoelastic:mainfrom
elasticsearchmachine merged 6 commits intoelastic:mainfrom
Conversation
This commit adds a limit to the `step_info` contained in `LifecycleExcutionState` so that large step info messages will not be stored in the cluster state. Additionally, when generating an ILM history failure, the full exception that is "stringified" is truncated to the same limit, ensuring that we do not accidentally index gigantic documents in the history store. The default limit is 1024 characters. Resolves elastic#124181
Collaborator
|
Pinging @elastic/es-data-management (Team:Data Management) |
Collaborator
|
Hi @dakrone, I've created a changelog YAML for you. |
nielsbauman
approved these changes
Mar 18, 2025
Contributor
nielsbauman
left a comment
There was a problem hiding this comment.
Left one non-blocking suggestion, other than that LGTM.
|
|
||
| public Builder setStepInfo(String stepInfo) { | ||
| this.stepInfo = stepInfo; | ||
| this.stepInfo = Strings.cleanTruncate(stepInfo, MAXIMUM_STEP_INFO_STRING_LENGTH); |
Contributor
There was a problem hiding this comment.
I think it would be valuable to add some truncation information to the string, i.e. ... x chars more or ... x chars truncated. If someone is looking at these step infos (from the API or the history), I think it would be valuable to know for sure that the string was truncated.
Member
Author
There was a problem hiding this comment.
Thanks for the suggestion, I added this!
Collaborator
💚 Backport successful
|
dakrone
added a commit
to dakrone/elasticsearch
that referenced
this pull request
Mar 18, 2025
elastic#125054) This commit adds a limit to the `step_info` contained in `LifecycleExcutionState` so that large step info messages will not be stored in the cluster state. Additionally, when generating an ILM history failure, the full exception that is "stringified" is truncated to the same limit, ensuring that we do not accidentally index gigantic documents in the history store. The default limit is 1024 characters. Resolves elastic#124181
elasticsearchmachine
pushed a commit
that referenced
this pull request
Mar 18, 2025
#125054) (#125140) This commit adds a limit to the `step_info` contained in `LifecycleExcutionState` so that large step info messages will not be stored in the cluster state. Additionally, when generating an ILM history failure, the full exception that is "stringified" is truncated to the same limit, ensuring that we do not accidentally index gigantic documents in the history store. The default limit is 1024 characters. Resolves #124181
smalyshev
pushed a commit
to smalyshev/elasticsearch
that referenced
this pull request
Mar 21, 2025
elastic#125054) This commit adds a limit to the `step_info` contained in `LifecycleExcutionState` so that large step info messages will not be stored in the cluster state. Additionally, when generating an ILM history failure, the full exception that is "stringified" is truncated to the same limit, ensuring that we do not accidentally index gigantic documents in the history store. The default limit is 1024 characters. Resolves elastic#124181
omricohenn
pushed a commit
to omricohenn/elasticsearch
that referenced
this pull request
Mar 28, 2025
elastic#125054) This commit adds a limit to the `step_info` contained in `LifecycleExcutionState` so that large step info messages will not be stored in the cluster state. Additionally, when generating an ILM history failure, the full exception that is "stringified" is truncated to the same limit, ensuring that we do not accidentally index gigantic documents in the history store. The default limit is 1024 characters. Resolves elastic#124181
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit adds a limit to the
step_infocontained inLifecycleExcutionStateso that large step info messages will not be stored in the cluster state. Additionally, when generating an ILM history failure, the full exception that is "stringified" is truncated to the same limit, ensuring that we do not accidentally index gigantic documents in the history store.The default limit is 1024 characters.
Resolves #124181