Phase Executionedit

The current phase definition, of an index’s policy being executed, is stored in the index’s metadata. This phase definition is cached to prevent changes to the policy from putting the index in a state where it cannot proceed from its current step. When the policy is updated we check to see if this phase definition can be safely updated, and if so, update the cached definition in indices using the updated policy. The phase and its actions are compiled into a series of discrete steps that are executed sequentially. Since some ILM actions are more complex and involve multiple operations against an index, each of these operations are done in isolation in a unit called a "step". The Explain Lifecycle API exposes this information to us to see which step our index is either to execute next, or is currently executing.