Skip to content

Repository Cleanup Endpoint (#43900)#45780

Merged
original-brownbear merged 3 commits intoelastic:7.xfrom
original-brownbear:43900-7.x
Aug 21, 2019
Merged

Repository Cleanup Endpoint (#43900)#45780
original-brownbear merged 3 commits intoelastic:7.xfrom
original-brownbear:43900-7.x

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

  • Snapshot cleanup functionality via transport/REST endpoint.
  • Added all the infrastructure for this with the HLRC and node client
  • Made use of it in tests and resolved relevant TODO
  • Added new Custom CS element that tracks the cleanup logic.
    Kept it similar to the delete and in progress classes and gave it
    some (for now) redundant way of handling multiple cleanups but only allow one
  • Use the exact same mechanism used by deletes to have the combination
    of CS entry and increment in repository state ID provide some
    concurrency safety (the initial approach of just an entry in the CS
    was not enough, we must increment the repository state ID to be safe
    against concurrent modifications, otherwise we run the risk of "cleaning up"
    blobs that just got created without noticing)
  • Isolated the logic to the transport action class as much as I could.
    It's not ideal, but we don't need to keep any state and do the same
    for other repository operations
    (like getting the detailed snapshot shard status)

backport of #43900

* Snapshot cleanup functionality via transport/REST endpoint.
* Added all the infrastructure for this with the HLRC and node client
* Made use of it in tests and resolved relevant TODO
* Added new `Custom` CS element that tracks the cleanup logic.
Kept it similar to the delete and in progress classes and gave it
some (for now) redundant way of handling multiple cleanups but only allow one
* Use the exact same mechanism used by deletes to have the combination
of CS entry and increment in repository state ID provide some
concurrency safety (the initial approach of just an entry in the CS
was not enough, we must increment the repository state ID to be safe
against concurrent modifications, otherwise we run the risk of "cleaning up"
blobs that just got created without noticing)
* Isolated the logic to the transport action class as much as I could.
It's not ideal, but we don't need to keep any state and do the same
for other repository operations
(like getting the detailed snapshot shard status)
@original-brownbear original-brownbear added :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport labels Aug 21, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed

* Fix Broken REST API Spec for Repo Cleanup
original-brownbear added a commit that referenced this pull request Aug 21, 2019
Disabling BwC tests so #45780 can be merged
@original-brownbear
Copy link
Copy Markdown
Contributor Author

Jenkins run
elasticsearch-ci/2

@original-brownbear original-brownbear merged commit 6aaee8a into elastic:7.x Aug 21, 2019
@original-brownbear original-brownbear deleted the 43900-7.x branch August 21, 2019 15:59
original-brownbear added a commit that referenced this pull request Aug 21, 2019
* Now that #45780 is merged BwC tests can be reenabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants