Skip to content

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Mar 17, 2025

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

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
@dakrone dakrone added >enhancement :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.19.0 v9.1.0 labels Mar 17, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Mar 17, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @dakrone, I've created a changelog YAML for you.

Copy link
Contributor

@nielsbauman nielsbauman left a comment

Choose a reason for hiding this comment

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

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, I added this!

@dakrone dakrone added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport Automatically create backport pull requests when merged labels Mar 18, 2025
@elasticsearchmachine elasticsearchmachine merged commit cda2669 into elastic:main Mar 18, 2025
17 checks passed
@dakrone dakrone deleted the truncate-long-ILM-errors branch March 18, 2025 17:45
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x
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
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 auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Data Management/ILM+SLM Index and Snapshot lifecycle management >enhancement Team:Data Management Meta label for data/management team v8.19.0 v9.1.0

3 participants