ipfs-cluster/cmd/ipfs-cluster-ctl
Hector Sanjuan d1700dbe81 Fixes #1319: Status wrongly shows pins as REMOTE
The Allocations of a pin that has been added with default replication factor
are kept even when the replication factor turns out to be -1.

This resulted in the Status(cid) code skipping calls to a number of peers
and setting the pin directly as REMOTE.

The fix, on one side makes sure Allocations is always nil when the replication
factor is -1. On the other size, lets the globalPinInfoCid method check the
replication factor value, rather than the number of allocations to decide if
any nodes are bound to be remote.

On the plus side, the pin tracker used the IsRemotePin method, which uses the
replication factor, so things were pinned even if the Status(cid) method shows
them as remote.
2021-03-24 00:47:15 +01:00
..
dist Chore: Add license file with URLS (#1014) 2020-03-06 13:52:19 +01:00
formatters.go Fixes #1319: Status wrongly shows pins as REMOTE 2021-03-24 00:47:15 +01:00
graph_test.go gofmt -s fixes 2020-04-14 23:44:18 +02:00
graph.go staticcheck: fix all staticcheck warnings in the project 2020-04-14 20:16:10 +02:00
main.go chore: make wait step reachable regardless of flags 2021-01-21 21:38:05 +00:00
Makefile Switch to building with -trimpath instead of asm and gc trimpath flags 2020-10-20 14:32:20 +02:00