-
Notifications
You must be signed in to change notification settings - Fork 230
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
[badgerdb] vlog growing unbounded - consider adding GC and exposing options #370
Comments
I've checked the official documentation of Badger regarding garbage collection. @woodzy , you're right. Since neither of us has experience using BadgerDB in a production environment, if you could, it would be great if you could submit a PR. This would be very helpful for most users who use BadgerDB as a persistent database.
|
…dgerDB garbage collection.
Thanks! These look like better implementations of my local workarounds during experimentation. |
* For issues #370, #369, and #363, add BadgerDB garbage collection. * Add default configuration for defaultGcInterval. * Solve DATA RACE. * Place Badger's configuration in main.go for users to adjust as needed. * Add TestGcLoop() for coverage. * Modify GcInterval to shorten test time. * Add the GcDiscardRatio option for the Badger hook, and include more detailed comments in the example. --------- Co-authored-by: JB <28275108+mochi-co@users.noreply.github.com>
This should be fixed in |
@woodzy @OpenJarvisAI Could this issue be closed? |
The issue has been resolved, and due to the lack of feedback over an extended period, we are closing this issue. If there are any further problems, please reopen it. |
I noticed that BadgerDB storage started growing unbounded (it was many files and several gigabytes quite quickly). Looks like the Badgerhold/Badger Storage example doesn't provide a way for the user to utilize GC correctly per Badgers docs. https://github.com/dgraph-io/badger/blob/main/db.go#L1225
Fairly sure the option tuning is probably useful to expose as well somehow -- for example ValueLogFileSize has a pretty large default
I didn't plumb up a full fix, just copied the default and started experimenting, but this showed that something like option tuning and GC can resolve the infinite growth modified a copy of the default to include some signalling and a regular GC call.
I would recommend at least adding the GC as a default. I would also suggest lowering some of the default or exposing them.
The text was updated successfully, but these errors were encountered: