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

Repo GC doesn't works with badger. #7793

Closed
Jorropo opened this issue Nov 30, 2020 · 5 comments
Closed

Repo GC doesn't works with badger. #7793

Jorropo opened this issue Nov 30, 2020 · 5 comments
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@Jorropo
Copy link
Contributor

Jorropo commented Nov 30, 2020

Version information:

$ ipfs version --all
go-ipfs version: 0.7.0
Repo version: 10
System version: amd64/linux
Golang version: go1.14.4

Description:

First create badger ds ipfs node.
Then add some file to the store (don't pin them or unpin them before continuation).
Run :

ipfs repo gc

Nothing happends (or sometime very few blocks actualy gets deleted (<0.01%)).

Might be a duplicate of #4300 but #4300 says that this should be fixed.
PS: I'm not talking about reclaiming disk space, I really just want to remove all blocks that are not pinned (someone downloaded some copyrighted contents with my node and I want to get it out without having to rm the store).

@Jorropo Jorropo added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Nov 30, 2020
@aschmahmann
Copy link
Contributor

This may be related to ipfs/go-ds-badger#54 which should be fixed in master (and in the upcoming release).

@Stebalien any thoughts on if these two issues are the same or if it's something else?

@Stebalien
Copy link
Member

I believe this is "poor command docs". ipfs get and the gateway don't pin files by default but ipfs add does unless you pass --pin=false.

If someone downloaded material through your gateway or the ipfs get command, the ipfs repo gc command should delete them.

@Jorropo
Copy link
Contributor Author

Jorropo commented Dec 1, 2020

This may be related to ipfs/go-ds-badger#54 which should be fixed in master (and in the upcoming release).

I'm gonna try with latest master and let you know, if it works I'll close 👀

I believe this is "poor command docs". ipfs get and the gateway don't pin files by default but ipfs add does unless you pass --pin=false.

I know thx :), it's not that bad.

If someone downloaded material through your gateway or the ipfs get command, the ipfs repo gc command should delete them.

My content was downloaded using the http gateway and ipfs get, I can confirm that with v0.7.0 and badger datastore ipfs repo gc doesn't remove non pinned blocks.

@Stebalien
Copy link
Member

Stebalien commented Dec 1, 2020 via email

@Jorropo
Copy link
Contributor Author

Jorropo commented Dec 1, 2020

Are you sure the contents weren't pinned somehow and how did you determine that the blocks weren't deleted?

They are not pinned, 100%.
In fact checking again I don't see any non pinned files anymore.
I was thinking that because I havn't see any message about deleted block, so it seems to be a bug about logging not gc.
Space is not reclaimed BTW (even if they are 150Gb of space to reclaim), but that might be expected.

@Jorropo Jorropo closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

3 participants