Skip to content

Delete data stream in ILM delete action if last index in data stream #69637

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

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Feb 25, 2021

If an index happens to be the last index in the data stream (such as a user testing ILM out) when it
comes to the delete action, we attempt to delete it, however, a data stream cannot be empty, so it
throws an exception and prevents the deletion.

This commit changes the behavior of the delete action such that deleting the very last index in a
data stream deletes the entire data stream.

If an index happens to be the last index in the data stream (such as a user testing ILM out) when it
comes to the `delete` action, we attempt to delete it, however, a data stream cannot be empty, so it
throws an exception and prevents the deletion.

This commit changes the behavior of the `delete` action such that deleting the very last index in a
data stream deletes the entire data stream.
@dakrone dakrone added :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.0.0 v7.13.0 labels Feb 25, 2021
@dakrone dakrone requested a review from andreidan February 25, 2021 21:54
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Feb 25, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Lee

@dakrone dakrone merged commit 9ec86c7 into elastic:master Mar 1, 2021
@dakrone dakrone deleted the delete-ds-if-last-index-in-ds branch March 1, 2021 16:43
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 1, 2021
…lastic#69637)

If an index happens to be the last index in the data stream (such as a user testing ILM out) when it
comes to the `delete` action, we attempt to delete it, however, a data stream cannot be empty, so it
throws an exception and prevents the deletion.

This commit changes the behavior of the `delete` action such that deleting the very last index in a
data stream deletes the entire data stream.
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 1, 2021
…lastic#69637)

If an index happens to be the last index in the data stream (such as a user testing ILM out) when it
comes to the `delete` action, we attempt to delete it, however, a data stream cannot be empty, so it
throws an exception and prevents the deletion.

This commit changes the behavior of the `delete` action such that deleting the very last index in a
data stream deletes the entire data stream.
dakrone added a commit that referenced this pull request Mar 1, 2021
…stream (#69637) (#69724)

If an index happens to be the last index in the data stream (such as a user testing ILM out) when it
comes to the `delete` action, we attempt to delete it, however, a data stream cannot be empty, so it
throws an exception and prevents the deletion.

This commit changes the behavior of the `delete` action such that deleting the very last index in a
data stream deletes the entire data stream.
dakrone added a commit that referenced this pull request Mar 1, 2021
…tream (#69637) (#69723)

If an index happens to be the last index in the data stream (such as a user testing ILM out) when it
comes to the `delete` action, we attempt to delete it, however, a data stream cannot be empty, so it
throws an exception and prevents the deletion.

This commit changes the behavior of the `delete` action such that deleting the very last index in a
data stream deletes the entire data stream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.12.1 v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants