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

Question: Secure deletion of values #1512

Open
ameba23 opened this issue Oct 21, 2024 · 2 comments
Open

Question: Secure deletion of values #1512

ameba23 opened this issue Oct 21, 2024 · 2 comments

Comments

@ameba23
Copy link

ameba23 commented Oct 21, 2024

I would like to be able to securely delete (zeroize) a value in a sled database.

Can i assume that if i overwrite a value by inserting a vector of zero bytes of the same length as the original stored value, the original value will no longer exist on disk?

Without knowing how sled represents values internally i cannot be sure if this is the case.

@reivilibre
Copy link

Not the author or an expert, but as sled is a log-structured database I would expect that when you delete a value, it will still exist on disk for the time being, but a tombstone entry will be persisted to mark it as deleted.
It's only once a compaction or garbage collection process happens later on, that the dead value might be removed.

@ameba23
Copy link
Author

ameba23 commented Jan 20, 2025

Not the author or an expert, but as sled is a log-structured database I would expect that when you delete a value, it will still exist on disk for the time being, but a tombstone entry will be persisted to mark it as deleted. It's only once a compaction or garbage collection process happens later on, that the dead value might be removed.

@reivilibre thank you for this. I tried both removing and overwriting values with zeros, and in both cases i was still able to read the original value directly out of the database file, so you are right.

I'm not sure if theres some way to manually trigger some cleanup process, i can't find anything about it in the docs.

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

No branches or pull requests

2 participants