Skip to content

Commit 80aa17e

Browse files
authored
Remove ILM's CleanupTargetIndexStep (#129130)
This step was added to ILM when downsampling was not yet retryable. Downsampling has been retryable for some time now, so there were no usages for this step. We still keep the step name (and use it for a no-op step) for BwC.
1 parent 96300a9 commit 80aa17e

File tree

4 files changed

+3
-328
lines changed

4 files changed

+3
-328
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/CleanupTargetIndexStep.java

Lines changed: 0 additions & 129 deletions
This file was deleted.

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/DownsampleAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class DownsampleAction implements LifecycleAction {
5252
public static final TimeValue DEFAULT_WAIT_TIMEOUT = new TimeValue(1, TimeUnit.DAYS);
5353
private static final ParseField FIXED_INTERVAL_FIELD = new ParseField(DownsampleConfig.FIXED_INTERVAL);
5454
private static final ParseField WAIT_TIMEOUT_FIELD = new ParseField("wait_timeout");
55+
static final String BWC_CLEANUP_TARGET_INDEX_NAME = "cleanup-target-index";
5556

5657
private static final ConstructingObjectParser<DownsampleAction, Void> PARSER = new ConstructingObjectParser<>(
5758
NAME,
@@ -141,7 +142,7 @@ public List<Step> toSteps(Client client, String phase, StepKey nextStepKey) {
141142
StepKey waitForNoFollowerStepKey = new StepKey(phase, NAME, WaitForNoFollowersStep.NAME);
142143
StepKey waitTimeSeriesEndTimePassesKey = new StepKey(phase, NAME, WaitUntilTimeSeriesEndTimePassesStep.NAME);
143144
StepKey readOnlyKey = new StepKey(phase, NAME, ReadOnlyStep.NAME);
144-
StepKey cleanupDownsampleIndexKey = new StepKey(phase, NAME, CleanupTargetIndexStep.NAME);
145+
StepKey cleanupDownsampleIndexKey = new StepKey(phase, NAME, BWC_CLEANUP_TARGET_INDEX_NAME);
145146
StepKey generateDownsampleIndexNameKey = new StepKey(phase, NAME, DownsamplePrepareLifeCycleStateStep.NAME);
146147
StepKey downsampleKey = new StepKey(phase, NAME, DownsampleStep.NAME);
147148
StepKey waitForDownsampleIndexKey = new StepKey(phase, NAME, WaitForIndexColorStep.NAME);

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/CleanupTargetIndexStepTests.java

Lines changed: 0 additions & 197 deletions
This file was deleted.

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/DownsampleActionTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void testToSteps() {
9999
assertThat(steps.get(4).getNextStepKey().name(), equalTo(DownsamplePrepareLifeCycleStateStep.NAME));
100100

101101
assertTrue(steps.get(5) instanceof NoopStep);
102-
assertThat(steps.get(5).getKey().name(), equalTo(CleanupTargetIndexStep.NAME));
102+
assertThat(steps.get(5).getKey().name(), equalTo(DownsampleAction.BWC_CLEANUP_TARGET_INDEX_NAME));
103103
assertThat(steps.get(5).getNextStepKey().name(), equalTo(DownsampleStep.NAME));
104104

105105
assertTrue(steps.get(6) instanceof DownsamplePrepareLifeCycleStateStep);

0 commit comments

Comments
 (0)