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

GC and TTLing blocks #13

Open
hsanjuan opened this issue Oct 6, 2023 · 0 comments
Open

GC and TTLing blocks #13

hsanjuan opened this issue Oct 6, 2023 · 0 comments

Comments

@hsanjuan
Copy link
Contributor

hsanjuan commented Oct 6, 2023

Badger has support for TTL records.

We could use TTL on records, but we would also have to modify the blockstore so that any blocks read are written with a new TTL. This implies making sure that that only happens when blocks have been read for the gateway, and not for other things (i.e. providing them on bitswap, or announcing them to the dht).

Then badgerGC would automatically remove non-used blocks.

This doesn't ensure that you don't run out of space (i.e. lots of very recent blocks). It would be better if we could do "delete blocks older than X" rather than giving every block a TTL. In any case might need to be combined with other GC strategy.

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

1 participant