Merge pull request #11338 from filecoin-project/fix/storage-alloc-err-soft

storage: Return soft err when sector alloc fails in acquire
This commit is contained in:
Andrew Jackson (Ajax) authored and GitHub committed 2023-10-18 09:38:49 -05:00
commit 14a7ae339f
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -548,7 +548,7 @@ func (st *Local) AcquireSector(ctx context.Context, sid storiface.SectorRef, exi
}
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)
+1
View File
@@ -232,6 +232,7 @@ func retrySoftErr(ctx context.Context, cb func() error) error {
fallthrough
case storiface.ErrTempAllocateSpace:
// retry
log.Errorw("retrying soft error", "err", err, "code", cerr.ErrCode())
default:
// non-temp error
return err