Class ReplaceDataStreamBackingIndexStep


public class ReplaceDataStreamBackingIndexStep extends ClusterStateActionStep
This step replaces a data stream backing index with the target index, as part of the data stream's backing indices. Eg. if data stream `foo-stream` is backed by indices [`foo-stream-000001`, `foo-stream-000002`] and we'd like to replace the first generation index, `foo-stream-000001`, with `shrink-foo-stream-000001`, after this step the `foo-stream` data stream will contain the following indices

[`shrink-foo-stream-000001`, `foo-stream-000002`]

The `foo-stream-000001` index will continue to exist but will not be part of the data stream anymore.

As the last generation is the write index of the data stream, replacing the last generation index is not allowed.

This is useful in scenarios following a restore from snapshot operation where the restored index will take the place of the source index in the ILM lifecycle or in the case where we shrink an index and the shrunk index will take the place of the original index.