diff --git a/pkg/local_object_storage/engine/get.go b/pkg/local_object_storage/engine/get.go index 4a9199be7..3df252803 100644 --- a/pkg/local_object_storage/engine/get.go +++ b/pkg/local_object_storage/engine/get.go @@ -91,7 +91,11 @@ func (e *StorageEngine) get(ctx context.Context, prm GetPrm) (GetRes, error) { } if it.ObjectExpired { - return GetRes{}, errNotFound + return GetRes{}, logicerr.New(it.OutError.Error()) + } + + if it.OutError != nil { + return GetRes{}, it.OutError } if it.Object == nil { @@ -146,7 +150,10 @@ func (i *getShardIterator) tryGetWithMeta(ctx context.Context) { res, err := sh.Get(ctx, i.ShardPrm) if err == nil { i.Object = res.Object() - return true + // Keep iterating over shards because the object's GC mark can be + // stored on another shard. For more information, please refer to + // https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/1403. + return false } if res.HasMeta() {