Skip to content

Commit 9e563d9

Browse files
authored
[DSL] Avoid reading the PREFER_ILM setting until needed (#105446) (#105457)
1 parent 20fc406 commit 9e563d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,10 +772,9 @@ public boolean isIndexManagedByDataStreamLifecycle(Index index, Function<String,
772772
* access method.
773773
*/
774774
private boolean isIndexManagedByDataStreamLifecycle(IndexMetadata indexMetadata) {
775-
boolean preferIlm = PREFER_ILM_SETTING.get(indexMetadata.getSettings());
776775
if (indexMetadata.getLifecyclePolicyName() != null && lifecycle != null && lifecycle.isEnabled()) {
777776
// when both ILM and data stream lifecycle are configured, choose depending on the configured preference for this backing index
778-
return preferIlm == false;
777+
return PREFER_ILM_SETTING.get(indexMetadata.getSettings()) == false;
779778
}
780779
return lifecycle != null && lifecycle.isEnabled();
781780
}

0 commit comments

Comments
 (0)