[Failure store] Introduce default retention for failure indices#127573
Merged
gmarouli merged 14 commits intoelastic:mainfrom May 3, 2025
Merged
[Failure store] Introduce default retention for failure indices#127573gmarouli merged 14 commits intoelastic:mainfrom
gmarouli merged 14 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-data-management (Team:Data Management) |
Collaborator
|
Hi @gmarouli, I've created a changelog YAML for you. |
jbaiera
approved these changes
May 2, 2025
| if (defaultRetention == null && maxRetention == null) { | ||
| return null; | ||
| } | ||
| if (maxRetention == null |
Member
There was a problem hiding this comment.
This seems a little brittle. Is there functionality relying on this or is this just an optimization?
Contributor
Author
There was a problem hiding this comment.
It's an optimisation. I was concerned that now that the failure default is always defined we are going to be creating too many of these. But it's probably premature. I will remove it.
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
gmarouli
added a commit
to gmarouli/elasticsearch
that referenced
this pull request
May 3, 2025
…tic#127573) We introduce a new global retention setting `data_streams.lifecycle.retention.failures_default` which is used by the data stream lifecycle management as the default retention when the failure store lifecycle of the data stream does not specify one. Elasticsearch comes with the default value of 30 days. The value can be changed via the settings API to any time value higher than 10 seconds or -1 to indicate no default retention should apply. The failures default retention can be set to values higher than the max retention, but then the max retention will be effective. The reason for this choice it to ensure that no deployments will be broken, if the user has already set up max retention less than 30 days. (cherry picked from commit fe36c42)
gmarouli
added a commit
that referenced
this pull request
May 3, 2025
#127573) (#127673) * [Failure store] Introduce default retention for failure indices (#127573) We introduce a new global retention setting `data_streams.lifecycle.retention.failures_default` which is used by the data stream lifecycle management as the default retention when the failure store lifecycle of the data stream does not specify one. Elasticsearch comes with the default value of 30 days. The value can be changed via the settings API to any time value higher than 10 seconds or -1 to indicate no default retention should apply. The failures default retention can be set to values higher than the max retention, but then the max retention will be effective. The reason for this choice it to ensure that no deployments will be broken, if the user has already set up max retention less than 30 days.
elasticsearchmachine
pushed a commit
that referenced
this pull request
May 3, 2025
This PR is adding the API capability to ensure that the API tests that check for the default failures retention will only be executed when the version supports this. This was missed in the original PR (#127573).
jfreden
pushed a commit
to jfreden/elasticsearch
that referenced
this pull request
May 12, 2025
…tic#127573) We introduce a new global retention setting `data_streams.lifecycle.retention.failures_default` which is used by the data stream lifecycle management as the default retention when the failure store lifecycle of the data stream does not specify one. Elasticsearch comes with the default value of 30 days. The value can be changed via the settings API to any time value higher than 10 seconds or -1 to indicate no default retention should apply. The failures default retention can be set to values higher than the max retention, but then the max retention will be effective. The reason for this choice it to ensure that no deployments will be broken, if the user has already set up max retention less than 30 days.
jfreden
pushed a commit
to jfreden/elasticsearch
that referenced
this pull request
May 12, 2025
This PR is adding the API capability to ensure that the API tests that check for the default failures retention will only be executed when the version supports this. This was missed in the original PR (elastic#127573).
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.
We introduce a new global retention setting
data_streams.lifecycle.retention.failures_defaultwhich is used by the data stream lifecycle management as the default retention when the failure store lifecycle of the data stream does not specify one.Elasticsearch comes with the default value of 30 days. The value can be changed via the settings API to any time value higher than 10 seconds or -1 to indicate no default retention should apply.
The failures default retention can be set to values higher than the max retention, but then the max retention will be effective. The reason for this choice it to ensure that no deployments will be broken, if the user has already set up max retention less than 30 days.