fix errors

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
This commit is contained in:
Wyatt Daviau 2018-03-12 10:51:31 -04:00
parent e2c4b6f5a9
commit b0e8452020
3 changed files with 5 additions and 8 deletions

View File

@ -74,12 +74,14 @@ func (c *Cluster) allocate(hash *cid.Cid, rplMin, rplMax int, blacklist []peer.I
}
}
newAllocs, err := c.obtainAllocations(hash,
newAllocs, err := c.obtainAllocations(
hash,
rplMin,
rplMax,
currentMetrics,
candidatesMetrics,
priorityMetrics)
priorityMetrics,
)
if err != nil {
return newAllocs, err
}

View File

@ -986,7 +986,7 @@ func (c *Cluster) PinGet(h *cid.Cid) (api.Pin, error) {
// If the argument's allocations are non-empty then these peers are pinned with
// priority over other peers in the cluster. If the max repl factor is less
// than the size of the specified peerset then peers are chosen from this set
// in allocation order. If the min repl factor is greater than the size of
// in allocation order. If the min repl factor is greater than the size of
// this set then the remaining peers are allocated in order from the rest of
// the cluster. Priority allocations are best effort. If any priority peers
// are unavailable then Pin will simply allocate from the rest of the cluster.

View File

@ -35,11 +35,6 @@ func (rpcapi *RPCAPI) Pin(in api.PinSerial, out *struct{}) error {
return rpcapi.c.Pin(in.ToPin())
}
// PinTo runs Cluster.PinTo().
func (rpcapi *RPCAPI) PinTo(in api.PinSerial, out *struct{}) error {
return rpcapi.c.PinTo(in.ToPin())
}
// Unpin runs Cluster.Unpin().
func (rpcapi *RPCAPI) Unpin(in api.PinSerial, out *struct{}) error {
c := in.ToPin().Cid