-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adding support for in-place delete #2
Comments
The best we could do is to track the last deleted entry, so when we have a new entry with a size lower than the last entry, we can fit it in the space instead of just allocating more space at the end of the file. This would definitely save lot's of space for UTXO db, This would not save completely the issue though, but frankly speaking, I think running defrag once a while is good enough. There is 2 defragmentation mode for a table in DBTRie. One is the "Copy/Defrag/Rename" and the other is the "Defragment Unsafe" which defragment the file directly, but if crash on the middle it would be irrecoverable. The time window where thing can go wrong should be quite low though. |
hmm interesting so a strategy for using defrag would be say every 10k blocks code will block consensus do defrag and continue. |
Yes. You need to test on big DB (maybe 10 GB), but I tried on a 2 GB table, and it took like 10s. |
This issue is to track and possibly try to add support for in-place hard delete
As far as I am aware to hard delete entries one needs to call defragment.
How can we delete at the point where the delete function is called.
The following is a convo I had with dbreee dev that might help:
The text was updated successfully, but these errors were encountered: