-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[Failure Store] Expose failure store lifecycle information via the GET
data stream API
#126668
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
base: main
Are you sure you want to change the base?
[Failure Store] Expose failure store lifecycle information via the GET
data stream API
#126668
Conversation
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.
LGTM, left a couple small comments. I think also now that we've removed the feature flag some of the code can be simplified.
@@ -29,6 +29,7 @@ | |||
* supports the following configurations only explicitly enabling or disabling the failure store | |||
*/ | |||
public record DataStreamFailureStore(Boolean enabled) implements SimpleDiffable<DataStreamFailureStore>, ToXContentObject { | |||
public static final String FAILURES_LIFECYCLE_API_CAPABILITY = "failures_lifecycle"; |
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.
Nit: It looks like this is only used in the rest action. Does it make sense to move this there? Alternatively, it's describing something about the structure of the response, should it be moved to the response object/action class?
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.
Also, name wise, should we make this something like failure_store.lifecycle
to denote specifically what part of the request is new? I see we have other changes to the response as well, so this is a soft suggestion. If you think this should be more generic to describe those changes that's also fine.
To retrieve the effective configuration you need to use the
GET
data streams API, for example, if a data stream has empty data stream options, it might still have failure store enabled from a cluster setting. The failure store is managed by default with a lifecycle with infinite (for now) retention, so the response will look like this:In case there is a failure indexed managed by ILM the failure index info will be displayed as follows.