Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.13] [ILM] Delete step deletes data stream with only one index (#105772) #105897

Merged

Conversation

andreidan
Copy link
Contributor

Backports the following commits to 8.13:

…5772)

We seem to have a couple of checks to make sure we delete the data
stream when the last index reaches the delete step however, these checks
seem a bit contradictory.

Namely, the first check makes use if `Index` equality (UUID included)
and the second just checks the index name. So if a data stream with just
one index (the write index) is restored from snapshot (different UUID)
we would've failed the first index equality check and go through the
second check `dataStream.getWriteIndex().getName().equals(indexName)`
and fail the delete step (in a non-retryable way :( ) because we don't
want to delete the write index of a data stream (but we really do if the
data stream has only one index)

This PR makes 2 changes: 1. use the index name equality everywhere in
the step (we already looked up the index abstraction and the parent data
stream, so we know for sure the managed index is part of the data
stream) 2. do not throw exception when we got here via a write index
that is NOT the last index in the data stream but report the exception
so we keep retrying this step (i.e. this enables our users to simply
execute a manual rollover and the index is deleted by ILM eventually on
retry)
@andreidan andreidan added :Data Management/ILM+SLM Index and Snapshot lifecycle management >bug auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Data Management Meta label for data/management team labels Mar 4, 2024
@elasticsearchmachine elasticsearchmachine merged commit 2103adc into elastic:8.13 Mar 4, 2024
14 checks passed
@andreidan andreidan deleted the backport/8.13/pr-105772 branch March 4, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v8.13.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants