Pinning operations take the pin lock, so that only one pinning operation can run at a time. When running ipfs pin add and another operation is currently running, it'll sit and wait until it acquires the lock and only then start to run. During this time there's no UI feedback.
Instead it should show something like "Waiting for other pin operations to finish... ok".
I think apart from ipfs pin add, this also applies to ipfs pin rm and ipfs add.
@lgierth Yeah, that would be nice. Currently we have no way of knowing that the lock is already taken, it just hangs as we try to acquire it. We should change that up a bit so we can do this
Beginner here. Would love to try this one out. Could some one please point me to the starting point. The IPFS code base is pretty large... @lgierth @whyrusleeping. Thank you.
Hey @biosckon, thanks for the help! The ipfs pin add command is in
If you follow the corerepo.Pin() call it will take you to the actual pin operation that acquires the lock in
https://github.com/ipfs/go-ipfs/blob/fcc96a3ae7c4ce45313cdc481d2b76d297ccb66f/pin/pin.go#L212-L215
With that said, bear in mind that there's no primitive to check if the lock is acquired (see 1, 2) and it doesn't seem like a trivial task to implement (at least to me that I'm new to Go) but if you already have enough experience with Go and feel confident about it go right ahead, if not, we have other issues you could tackle. Ping me if you have any questions.
@schomatis thank you. Let me take for a s"pin". 馃憤
We no longer take the pin lock while fetching data. Instead, we only hold it when modifying the pinning datastructures.
We _do_ take the GC (read) lock but that's a different issue.
Most helpful comment
@schomatis thank you. Let me take for a s"pin". 馃憤