这是indexloc提供的服务,不要输入任何密码
Skip to content

Add garbage collector for badger #48

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

Merged
merged 1 commit into from
Sep 22, 2020
Merged

Conversation

christian-roggia
Copy link
Contributor

There is a very important feature missing from BagderDB: the garbage collector for database vlog files.
We have experienced database outage due to "no space left on device" errors, an internal investigation led to the conclusion that the database vlogs were increasing at each restart and never collected, ultimately leading to the disk being completely filled with vlogs.

This PR introduces a garbage collector routine as described in https://dgraph.io/docs/badger/get-started/#garbage-collection

If merged this PR it can be further extended by add 2 new flags --gc-interval=5m --gc-discard-ratio=0.5 as well as a context that can be used to cancel the garbage collector.

Copy link
Owner

@mosuka mosuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mosuka
Copy link
Owner

mosuka commented Sep 22, 2020

Thanks for the PR.
I appreciate your contribution!

@mosuka mosuka merged commit 5a75bce into mosuka:master Sep 22, 2020
@christian-roggia christian-roggia deleted the add-badger-gc branch September 22, 2020 18:00
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

Successfully merging this pull request may close these issues.

2 participants