Skip to content

ILM should set indexing_complete from the readonly action #128936

@joegallo

Description

@joegallo

I'm tempted to call this a bug, but it's more a lack of coverage in the overall behavior of the system rather than a bug in any particular piece of code, so I'm going with >enhancement.

The unfollow action (in UnfollowAction.java) has the following note:

 * 1) The index must have {@link LifecycleSettings#LIFECYCLE_INDEXING_COMPLETE} set to {@code true}, which is
 *      done automatically by {@link RolloverAction} (or manually).

Indeed, the only ILM action that currently sets LIFECYCLE_INDEXING_COMPLETE to true is the RolloverAction. But there are valid uses of ILM that don't happen to use the rollover action mechanism, and it's a shame that these use cases are currently unable to use ILM with CCR without needing to manually inject this setting (ILM's interaction with CCR uses the unfollow action).

It seems to me that the intent of the LIFECYCLE_INDEXING_COMPLETE setting (and setting it once an index has rolled over) is equally applicable to the notion of the readonly action, so my proposal is that we add the same set-indexing-complete logic from RolloverAction into the ReadOnlyAction in order to allow users that are using CCR and ILM (but not using rollover) to still have a way of having everything work together without requiring manual intervention.

There's also some logic in TimeSeriesLifecycleType (added in #37625 and expanded in #54803) that automatically injects an Unfollow action in certain circumstances -- I don't think that logic would need to change because of this change, but I might be missing something.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions