-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Repository Cleanup Endpoint #43900
Repository Cleanup Endpoint #43900
Conversation
Thanks @tlrx
Np, so do I :D
I like the one level of nesting better but have no strong arguments for it other than maybe consistency with other APIs and extensibility.
Yea but in the end I'm not sure I see the point. If you think about it, all you can present to the user is a bunch of uuids for indices and stale root blobs). What can they really get out of that? |
Jenkins run elasticsearch-ci/bwc |
2 similar comments
Jenkins run elasticsearch-ci/bwc |
Jenkins run elasticsearch-ci/bwc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Jenkins run elasticsearch-ci/packaging-sample |
@tlrx ping :) (no rush I know you just returned)
I still like the current format :) ... mainly for its easier extensibility. If that's the last thing blocking this maybe we can go with the current version and merge this? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Concerning the response output I expressed my opinion but if both you and @andrershov prefer the proposed format then I'm fine :)
Thanks for the response on the dry-run option, I wanted to know if it was considered at some point. Since this is something that can be added later, we'll see if someone requests it.
Thanks so much @tlrx and @andrershov for reviewing this big one! |
* 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)
Disabling BwC tests so elastic#45780 can be merged
* Repository Cleanup Endpoint (#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)
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