Skip to content

Conversation

@gmarouli
Copy link
Contributor

@gmarouli gmarouli commented Mar 10, 2025

In this PR we perform some pre-work to facilitate the introduction of the failure lifecycle. The goal of this PR prepare our code base to start using the failure store lifecycle configuration as soon as it becomes available.

Extracting basic lifecycle behaviour in an interface
We extract an interface called BasicDataSteamLifecycle which is meant to abstract the basic behaviour we expect every lifecycle to have. Meaning:

  1. To be enabled or disabled.
  2. To have a retention.
  3. To be able to calculate the effective retention.

The current DataStreamLifecycle implements this interface and extends the provided functionality by adding the downsampling feature too.

In a follow up PR, the FailureStoreLifecycle will also extend it. This split is necessary for now, because we want to follow the new templating framework we introduced with #117357. When we move the data stream lifecycle also under the data_stream_options we can reevaluate if the interface makes sense.

Separate functionally data and failure lifecycle

In the DataStream we split the lifecycle to two, the data and failure lifecycle. Currently, they refer to the exact same configuration but this will change in the follow up PR.

Open tasks:

  • See how it works with ExplainIndexDataStreamLifecycle

Update: Re-evaluating earlier than expected because I am wondering if this is causing issues when serialising it in ExplainIndexDataStreamLifecycle.

@gmarouli gmarouli added >refactoring :Data Management/Data streams Data streams and their lifecycles labels Mar 10, 2025
@gmarouli gmarouli requested a review from jbaiera March 10, 2025 11:58
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Mar 10, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@gmarouli gmarouli marked this pull request as draft March 10, 2025 14:09
@gmarouli gmarouli changed the title [Failure store]: prework to facilitate failure lifecycle. PoC - [Failure store]: prework to facilitate failure lifecycle. Mar 10, 2025
@gmarouli
Copy link
Contributor Author

Having two configuration classes will not work nicely with the lifecycle explain code. For this reason, we abort this PR.

@gmarouli gmarouli closed this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Data streams Data streams and their lifecycles >refactoring Team:Data Management Meta label for data/management team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants