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

fix: Clean up shape folders and remove unrecoverable shapes #2051

Merged
merged 8 commits into from
Nov 27, 2024

Conversation

msfstef
Copy link
Contributor

@msfstef msfstef commented Nov 26, 2024

Followup to #2049

We are currently leaving folders behind when deleting shapes, which do take up a little bit of space and eventually could be a bit of an issue. This PR takes care of removing everything.

Additionally, when a shape fails to recover by not being able to start the consumer at all (see CubDB issue), the shape data is removed using a new method called unsafe_cleanup! which simply rm -rfs the shape directory. Not great to use while the shape is active as it can cause various bugs, but great for cleaning up.

@msfstef msfstef force-pushed the msfstef/remove-unrecoverable-shape branch from 927eb72 to 4702ae4 Compare November 26, 2024 17:39
Copy link
Contributor

@robacourt robacourt left a comment

Choose a reason for hiding this comment

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

Lovely

Copy link
Contributor

@magnetised magnetised left a comment

Choose a reason for hiding this comment

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

Good stuff, though disconcerting lack of tests..

@msfstef
Copy link
Contributor Author

msfstef commented Nov 27, 2024

@magnetised it wouldn't be called unsafe if it was tested 🤔 (added test 313729d)

@msfstef msfstef merged commit 3c24208 into main Nov 27, 2024
25 of 26 checks passed
@msfstef msfstef deleted the msfstef/remove-unrecoverable-shape branch November 27, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants