-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Conversation
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).
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.
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.
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataDeleteIndexService.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/DeleteStep.java
Outdated
Show resolved
Hide resolved
...n/core/src/main/java/org/elasticsearch/xpack/core/ilm/ReplaceDataStreamBackingIndexStep.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/RolloverStep.java
Show resolved
Hide resolved
…cture as the others.
…g the single backing write index. All other cases will get an error.
...ore/src/test/java/org/elasticsearch/xpack/core/ilm/CheckNoDataStreamWriteIndexStepTests.java
Outdated
Show resolved
Hide resolved
assertThat(listenerCalled.get(), is(true)); | ||
} | ||
|
||
public void testDeleteWorksIfWriteIndexIsTheOnlyIndexInDataStream() throws Exception { |
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.
<3
@elasticmachine update branch |
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.
This looks good to me!
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/DeleteStep.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/WaitForRolloverReadyStep.java
Outdated
Show resolved
Hide resolved
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.
I already approved but now I'm really done :). Thanks for iterating on this!
@elasticmachine update branch |
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! 🚀 Great work @jbaiera ILM ❤️ failure store
@elasticmachine update branch |
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.