Skip to content

Changing the ILM policy for a managed index is non-deterministic #70151

@andreidan

Description

@andreidan

Currently, assigning a managed index to a different policy yields a non-deterministic behaviour due to the caching of the current phase an index is going through.

eg. An index managed by an ILM policy (policy A) is added to a new ILM policy (policy B) while still in the hot phase of policy A by using the update index settings API. Due to the cached phase definition in the index metadata, even if that phase is from a previous ILM policy (policy A), it will still need to be completed. Therefore the index will remain in the hot phase pending to roll over, having to wait for the rollover of the first policy to happen before it can go into a new phase (the new phase in this case will be the first phase of policy B)

This would not be the case if the ILM remove policy API would be used to remove the first policy, before assigning a new one, however, this api might be something our users don't know of (as opposed to the update index settings API)

I'm proposing to at least document the non-deterministic behaviour and/or react to the index.lifecycle.name configuration change and mimic the ILM remove policy API behaviour.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions