Skip to content

ILM delete phase deletes searchable snapshot before index #116801

@DaveCTurner

Description

@DaveCTurner

When ILM deletes a searchable snapshot index, it deletes the snapshot first, waits for that to complete, and then deletes the index. This means that there's a period of time when the index still exists but attempts to search it may fail with a org.elasticsearch.snapshots.SnapshotMissingException.

CleanupSnapshotStep cleanupSnapshotStep = new CleanupSnapshotStep(cleanSnapshotKey, deleteStepKey, client);
DeleteStep deleteStep = new DeleteStep(deleteStepKey, nextStepKey, client);

We should delete the index first, and only delete the snapshot once the index deletion is complete.

Relates #116379 which can prevent the snapshot deletion from completing properly, leaving the index in a broken state for a long time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions