Skip to content

Commit ed38398

Browse files
committed
Clear out the cache any time the policies change
1 parent 58ac8a0 commit ed38398

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ Map<String, Map<Step.StepKey, Step>> getStepMap() {
103103
public void update(IndexLifecycleMetadata meta) {
104104
assert meta != null : "IndexLifecycleMetadata cannot be null when updating the policy steps registry";
105105

106+
// since the policies (may have) changed, the whole steps cache needs to be thrown out
107+
cachedSteps.clear();
108+
106109
DiffableUtils.MapDiff<String, LifecyclePolicyMetadata, Map<String, LifecyclePolicyMetadata>> mapDiff = DiffableUtils.diff(
107110
lifecyclePolicyMap,
108111
meta.getPolicyMetadatas(),

0 commit comments

Comments
 (0)