'ipfs block rm' is slow
Open
kind/bug
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
Issues:
* Running the command `ipfs block rm SomeBlock` is slow.
* While `ipfs block rm` is running, `ipfs repo gc`, `ipfs add`, and `ipfs pin add` hang.
Unfortunately, to make sure we're not removing a _pinned_ block, `ipfs block rm` currently:
1. Takes the _global_ GC lock as it's effectively a micro-GC. That is, we don't want a pin to _reference_ this block while we're in the middle of removing it.
2. Walks over all _pinned_ files to make sure the block isn't part of a pinned file.
Together this means that `ipfs block rm` effectively locks up much of the daemon for quite a while.
---
The current recommendation is to avoid this command if at all possible.
Contributor guide
Assessment
This issue has not been assessed yet.