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

Garbage collection doesn't free up space when using badger #4300

Closed
leerspace opened this issue Oct 12, 2017 · 5 comments
Closed

Garbage collection doesn't free up space when using badger #4300

leerspace opened this issue Oct 12, 2017 · 5 comments
Assignees
Labels
topic/badger Topic badger topic/repo Topic repo

Comments

@leerspace
Copy link
Contributor

Version information:

go-ipfs version: 0.4.11-
Repo version: 6
System version: amd64/linux
Golang version: go1.9

Type:

Bug

Severity:

Medium/High

Description:

When running garbage collection on a repo using the badger datastore, local storage is not freed up after running ipfs repo gc.

@Stebalien
Copy link
Member

Yeah, that's because badger has to do a separate internal GC. Currently, we don't manually trigger it on repo GC but we probably should.

@Stebalien Stebalien added kind/bug A bug in existing code (including security flaws) topic/repo Topic repo and removed kind/bug A bug in existing code (including security flaws) labels Oct 13, 2017
@leerspace
Copy link
Contributor Author

It looks like this might have been "fixed" by ipfs/go-datastore#68 and the "Basic GC Implementation" commit to go-ds-badger (?). Should this work already or do the changes to go-ds-badger just need to bubble up?

@magik6k
Copy link
Member

magik6k commented Jan 4, 2018

The changes are bubbled up, just not wired up to gc logic

@magik6k
Copy link
Member

magik6k commented Jan 16, 2018

#4578 is going to fix this, at least for big datastores (few gigs with with 100s of MBs of reclaimable space).

For full GC there is an offline tool being developed in dgraph-io/badger#400, which will likely help with the cases where the online badger GC doesn't help

@schomatis schomatis added the topic/badger Topic badger label May 3, 2018
@schomatis
Copy link
Contributor

schomatis commented May 3, 2018

#4578 has been merged and the GC logic is working, note however that the GC mechanism for badger is not the same as for flatfs, some space may not be immediately reclaimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/badger Topic badger topic/repo Topic repo
Projects
None yet
Development

No branches or pull requests

4 participants