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 a replicate_for option to the ILM searchable_snapshot action #119003

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

joegallo
Copy link
Contributor

Adds a replicate_for option (expressed as a time value) to the ILM searchable_snapshot action. If that option is present, then the searchable snapshot will be mounted with one replica (rather than zero replicas), and ILM execution will wait in the searchable snapshot action until the replicate_for time value has passed. Once the time value has passed, then the replica will be removed and execution will continue.

As an example, this makes it possible to have a frozen phase that lasts for 60 days, but to have 14 days worth of frozen data mounted with replicas.


This is a draft pull request. I think the implementation side is complete -- it adds the new replicate_for option and also the policy validation rules around it. There are some unit tests, but I need to do the following still:

  • Unit test the validation rules
  • Integration test(s)
  • Documentation

@joegallo joegallo added >enhancement WIP :Data Management/ILM+SLM Index and Snapshot lifecycle management auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 labels Dec 18, 2024
@joegallo joegallo requested a review from dakrone December 18, 2024 18:47
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

Provisionally looks good to me!

@@ -473,6 +474,77 @@ static void validateDownsamplingIntervals(Collection<Phase> phases) {
}
}

static void validateReplicateFor(Collection<Phase> phases) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a javadoc snippet for what this validation is going to this method?

false,
new SingleMessageFieldInfo(
Strings.format(
"Waiting until the replicate_for time [%s] has elapsed for index [%s] before removing replicas.",
Copy link
Member

Choose a reason for hiding this comment

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

Think it'd be worth also including how long the calculated time is? So that a user can see "oh, it's waiting for 7 days and it's at 6 days right now"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Data Management/ILM+SLM Index and Snapshot lifecycle management >enhancement v8.18.0 v9.0.0 WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants