Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: Return soft err when sector alloc fails in acquire #11338

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion storage/paths/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions storage/pipeline/states_sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down