ipfs / ipfs/kubo

'ipfs block rm' is slow

Open
#6,562 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.