Skip to content

Allow Bulk Snapshot Deletes to Abort#56009

Merged
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:one-stop-delete
May 4, 2020
Merged

Allow Bulk Snapshot Deletes to Abort#56009
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:one-stop-delete

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

@original-brownbear original-brownbear commented Apr 30, 2020

Making use of #55773 to simplify snapshot state machine.

  1. Deletes with no in-progress snapshot now add the delete entry to the cluster state right away
    instead of doing a second CS update after the fist update was a NOOP.
  2. If a bulk delete matches in-progress as well as completed snapshots, abort the in-progress snapshot and then move on to delete from the repository.

NOTE: I didn't refactor things significantly in this PR for now to keep the change-set limited but there's a number of possible follow-ups here to simplify the state update task nesting away and make things much easier to read.

Making use of #55773 to simplify snapshot state machine.
1. Deletes with no in-progress snapshot now add the delete entry to the cluster state right away
instead of doing a second CS update after the fist update was a NOOP.
2. If a bulk delete matches in-progress as well as completed snapshots, abort the in-progress snapshot
and then move on to delete from the repository.
@original-brownbear original-brownbear added >enhancement :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.8.0 labels Apr 30, 2020
@original-brownbear
Copy link
Copy Markdown
Contributor Author

Jenkins test this

Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks Tanguy!

@original-brownbear original-brownbear merged commit 84522d2 into elastic:master May 4, 2020
@original-brownbear original-brownbear deleted the one-stop-delete branch May 4, 2020 12:57
original-brownbear added a commit that referenced this pull request May 4, 2020
Making use of #55773 to simplify snapshot state machine.
1. Deletes with no in-progress snapshot now add the delete entry to the cluster state right away
instead of doing a second CS update after the fist update was a NOOP.
2. If a bulk delete matches in-progress as well as completed snapshots, abort the in-progress snapshot
and then move on to delete from the repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement v7.8.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants