-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
base: main
Are you sure you want to change the base?
Add a replicate_for option to the ILM searchable_snapshot action #119003
Conversation
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.
Provisionally looks good to me!
@@ -473,6 +474,77 @@ static void validateDownsamplingIntervals(Collection<Phase> phases) { | |||
} | |||
} | |||
|
|||
static void validateReplicateFor(Collection<Phase> phases) { |
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.
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.", |
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.
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"?
Adds a
replicate_for
option (expressed as a time value) to the ILMsearchable_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 thereplicate_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: