stores: nicer error when sector was lost
This commit is contained in:
parent
a0af4d4d2b
commit
9777ddd2b7
@ -277,11 +277,9 @@ func (i *Index) StorageBestAlloc(ctx context.Context, allocate SectorFileType, s
|
|||||||
|
|
||||||
for _, p := range i.stores {
|
for _, p := range i.stores {
|
||||||
if sealing && !p.info.CanSeal {
|
if sealing && !p.info.CanSeal {
|
||||||
log.Debugf("alloc: not considering %s; can't seal", p.info.ID)
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if !sealing && !p.info.CanStore {
|
if !sealing && !p.info.CanStore {
|
||||||
log.Debugf("alloc: not considering %s; can't store", p.info.ID)
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +92,10 @@ func (r *Remote) acquireFromRemote(ctx context.Context, s abi.SectorID, fileType
|
|||||||
return "", "", "", nil, err
|
return "", "", "", nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(si) == 0 {
|
||||||
|
return "", "", "", nil, xerrors.Errorf("failed to acquire sector %v from remote(%d): not found", s, fileType)
|
||||||
|
}
|
||||||
|
|
||||||
sort.Slice(si, func(i, j int) bool {
|
sort.Slice(si, func(i, j int) bool {
|
||||||
return si[i].Weight < si[j].Weight
|
return si[i].Weight < si[j].Weight
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user