-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: built-in periodic gc #87
Conversation
2d434bb
to
05330a8
Compare
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.
Generally LGTM, found a small bug and it seems like we can probably abstract over some of the OS layer specifics.
Adding tests here seems annoying, but wonder if we should have a basic one. For example set the GC interval to 1s and free 100% and make sure the data gets GC'd from the blockstore layer (nothing we can really do about the DB layer if that GC happens separately).
@aschmahmann I refactored with the package you mentioned for cross-os compatibility. I also added a test, but it is far from what I would want. We need a way to actually start an isolated rainbow instance with all configurations. That's tracked in #89. |
the server handler registers global prometheus stuff. if we do that twice, panics. we have to figure out how to do this without globally setting prometheus
@aschmahmann can you also take a look at ipfs/boxo#579? There was a race condition in the tests that that PR fixes. |
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 aside from the one change
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
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 (once the other PR is merged)
Closes #65.
DEPENDS ON ipfs/boxo#579
Matches (I think) the behaviour of our current script: https://github.com/ipshipyard/waterworks-infra/blob/master/ansible/roles/rainbow/files/rainbow-gc.sh
Every hour, calls GC if less than 30% of the disk space is available.
Only works on Unix based systems.