Skip to content

Commit 52914e4

Browse files
[Profiling] Use descriptive name for ILM policy (#96969)
With this commit we rename the default ILM policy for profiling from `profiling` to `profiling-60-days` which describes the policy's intention and allows to add related policies in the future more naturally.
1 parent 3f216d1 commit 52914e4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

x-pack/plugin/profiler/src/main/java/org/elasticsearch/xpack/profiler/ProfilingIndexTemplateRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected boolean requiresMasterNode() {
7575

7676
private static final List<LifecyclePolicy> LIFECYCLE_POLICIES = List.of(
7777
new LifecyclePolicyConfig(
78-
"profiling",
78+
"profiling-60-days",
7979
"/org/elasticsearch/xpack/profiler/ilm-policy/profiling-60-days.json",
8080
Map.of(PROFILING_TEMPLATE_VERSION_VARIABLE, String.valueOf(INDEX_TEMPLATE_VERSION))
8181
).load(LifecyclePolicyConfig.DEFAULT_X_CONTENT_REGISTRY)

x-pack/plugin/profiler/src/test/java/org/elasticsearch/xpack/profiler/ProfilingIndexTemplateRegistryTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void testThatNonExistingPoliciesAreAddedImmediately() throws Exception {
139139
assertThat(action, instanceOf(PutLifecycleAction.class));
140140
assertThat(request, instanceOf(PutLifecycleAction.Request.class));
141141
final PutLifecycleAction.Request putRequest = (PutLifecycleAction.Request) request;
142-
assertThat(putRequest.getPolicy().getName(), equalTo("profiling"));
142+
assertThat(putRequest.getPolicy().getName(), equalTo("profiling-60-days"));
143143
assertNotNull(listener);
144144
return AcknowledgedResponse.TRUE;
145145
} else if (action instanceof PutComponentTemplateAction) {
@@ -273,7 +273,7 @@ public void testPolicyUpgraded() throws Exception {
273273
assertThat(action, instanceOf(PutLifecycleAction.class));
274274
assertThat(request, instanceOf(PutLifecycleAction.Request.class));
275275
final PutLifecycleAction.Request putRequest = (PutLifecycleAction.Request) request;
276-
assertThat(putRequest.getPolicy().getName(), equalTo("profiling"));
276+
assertThat(putRequest.getPolicy().getName(), equalTo("profiling-60-days"));
277277
assertNotNull(listener);
278278
return AcknowledgedResponse.TRUE;
279279

0 commit comments

Comments
 (0)