Skip to content
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

Add support for failure stores in ILM #108741

Merged
merged 22 commits into from
Jun 5, 2024

Conversation

jbaiera
Copy link
Member

@jbaiera jbaiera commented May 16, 2024

Failure stores on a data stream will inherit the ILM policy of the parent data stream by default. This PR adds logic to ensure failure stores are properly accounted for in data stream related ILM operations.

We should maybe take a look at doing this more widespread to simplify the builder code when making modifications.
Tests are mostly set up to randomly switch operations between failure indices and backing indices.

Most steps and actions will support failure stores without too much fuss. Main concerns are any actions where their successful operation is dependent on shard counts (like shrink/resize).
@jbaiera jbaiera added >non-issue :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.15.0 labels May 16, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label May 16, 2024
@elasticsearchmachine
Copy link
Collaborator

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

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.

This is looking good! This doesn't also make failure stores use the ILM policy from their data stream, though, right? I'm assuming you'll do that in a follow-up PR?

I only have a couple of comments on the non-test code; I'll have a look at the test code later.

assertThat(listenerCalled.get(), is(true));
}

public void testDeleteWorksIfWriteIndexIsTheOnlyIndexInDataStream() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

<3

gmarouli added a commit to gmarouli/elasticsearch that referenced this pull request May 22, 2024
@jbaiera
Copy link
Member Author

jbaiera commented May 22, 2024

@elasticmachine update branch

@jbaiera jbaiera requested a review from gmarouli May 23, 2024 15:58
@jbaiera jbaiera requested a review from nielsbauman May 23, 2024 15:58
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.

This looks good to me!

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.

I already approved but now I'm really done :). Thanks for iterating on this!

@jbaiera
Copy link
Member Author

jbaiera commented May 30, 2024

@elasticmachine update branch

Copy link
Contributor

@gmarouli gmarouli left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀 Great work @jbaiera ILM ❤️ failure store

@jbaiera
Copy link
Member Author

jbaiera commented Jun 5, 2024

@elasticmachine update branch

@jbaiera jbaiera merged commit 7ea0d4b into elastic:main Jun 5, 2024
15 checks passed
@jbaiera jbaiera deleted the failure-store-ilm-support branch June 5, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/ILM+SLM Index and Snapshot lifecycle management >non-issue Team:Data Management Meta label for data/management team v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants