storage: Return soft err when sector alloc fails in acquire
This commit is contained in:
parent
9fc3c3351a
commit
d981baa362
@ -548,7 +548,7 @@ func (st *Local) AcquireSector(ctx context.Context, sid storiface.SectorRef, exi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if best == "" {
|
if best == "" {
|
||||||
return storiface.SectorPaths{}, storiface.SectorPaths{}, xerrors.Errorf("couldn't find a suitable path for a sector")
|
return storiface.SectorPaths{}, storiface.SectorPaths{}, storiface.Err(storiface.ErrTempAllocateSpace, xerrors.Errorf("couldn't find a suitable path for a sector"))
|
||||||
}
|
}
|
||||||
|
|
||||||
storiface.SetPathByType(&out, fileType, best)
|
storiface.SetPathByType(&out, fileType, best)
|
||||||
|
@ -232,6 +232,7 @@ func retrySoftErr(ctx context.Context, cb func() error) error {
|
|||||||
fallthrough
|
fallthrough
|
||||||
case storiface.ErrTempAllocateSpace:
|
case storiface.ErrTempAllocateSpace:
|
||||||
// retry
|
// retry
|
||||||
|
log.Errorw("retrying soft error", "err", err, "code", cerr.ErrCode())
|
||||||
default:
|
default:
|
||||||
// non-temp error
|
// non-temp error
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user