[#312] pool: Ignore ECInfoErr erros in GetSplitInfo
All checks were successful
DCO / DCO (pull_request) Successful in 1m53s
Tests and linters / Tests (pull_request) Successful in 2m5s
Tests and linters / Lint (pull_request) Successful in 2m21s

* Ignore `ECInfoError` errors after raw `HeadObject` request

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-12-11 18:23:37 +03:00
parent c4463df8d4
commit 1bc3f40f0e

View file

@ -3211,11 +3211,12 @@ func (p *Pool) GetSplitInfo(ctx context.Context, cnrID cid.ID, objID oid.ID, tok
_, err := p.HeadObject(ctx, prm)
var errSplit *object.SplitInfoError
var errECInfo *object.ECInfoError
switch {
case errors.As(err, &errSplit):
return errSplit.SplitInfo(), nil
case err == nil:
case err == nil || errors.As(err, &errECInfo):
return nil, relations.ErrNoSplitInfo
default:
return nil, fmt.Errorf("failed to get raw object header: %w", err)