-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ipfs block rm
#2914
Comments
Is should be really easy as we also have |
@Kubuxu that would be something for the files api. The block API is really well scoped as the put and get only also return or add a single block |
Ahh, right. So yeah, |
How should removing pinned blocks be handled? Disallow? Allow and ignore pin? (This could then cause many problems with ipfs commands, for example the garbage collector will abort) Allow and attempt to do something about the pin? (Not so easy unless the pin a a direct pin.) |
Yeah, we need to make sure we don't remove blocks that are pinned. |
Good point. If a block is pinned, it should error saying that it is pinned |
I agree at least by default. However, for performance reasons, we might want to add an option to disable this detection if the user knows what they are doing. I am not 100% sure I understand the pining code but it seams that to detect indirect pins all recursive pins need to be walked, thus making pin detection expensive. It looks like there might be some caching going on in the datastore under the prefix 'local/pins/indirect/keys/' but it doesn't seam like this is used by |
Yeah, pin detection is expensive. We can optimize with various caching structures though in the future. |
I know the issues involved so I take responsibility for this one. |
Participating. |
Any update on this one? :) |
@diasdavid please see #2962 |
we have this now :) |
woot! |
Currently, the only way of deleting blocks in go-ipfs is through
repo gc
. In js-ipfs land, since the Block Service exposes an interface to delete, we also have exposed that on the block API. It is very convenient for testing and a quick way to delete a specific block.Can we expose this feature in go-ipfs too?
The text was updated successfully, but these errors were encountered: