From 24514695586e760a1efe05925198711aa7644b14 Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Tue, 24 Oct 2023 20:12:06 +0100 Subject: [PATCH] storage: Return soft err when sector alloc fails in acquire (#11350) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Magiera --- storage/paths/local.go | 2 +- storage/pipeline/states_sealing.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/paths/local.go b/storage/paths/local.go index 7d1be644a..577d4dbe0 100644 --- a/storage/paths/local.go +++ b/storage/paths/local.go @@ -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) diff --git a/storage/pipeline/states_sealing.go b/storage/pipeline/states_sealing.go index a562e635c..5c91161ef 100644 --- a/storage/pipeline/states_sealing.go +++ b/storage/pipeline/states_sealing.go @@ -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