From 12ddefe07877933bfdf28942d3b355650dd33ed7 Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Sat, 27 Apr 2024 23:06:15 +0300 Subject: [PATCH] [#218] object: Implement `Range\RangeHash` requests for EC object Signed-off-by: Anton Nikiforov --- client/object_get.go | 6 ++++++ go.mod | 2 +- go.sum | Bin 73369 -> 73644 bytes 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/object_get.go b/client/object_get.go index a97fa76..8c821de 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -261,6 +261,7 @@ func (x *ObjectReader) close(ignoreEOF bool) (*ResObjectGet, error) { // Return errors: // // *object.SplitInfoError (returned on virtual objects with PrmObjectGet.MakeRaw). +// *object.ECInfoError (returned on erasure-coded objects with PrmObjectGet.MakeRaw). // // Return statuses: // - global (see Client docs); @@ -457,6 +458,7 @@ func (prm *PrmObjectHead) buildRequest(c *Client) (*v2object.HeadRequest, error) // Return errors: // // *object.SplitInfoError (returned on virtual objects with PrmObjectHead.MakeRaw). +// *object.ECInfoError (returned on erasure-coded objects with PrmObjectHead.MakeRaw). // // Return statuses: // - global (see Client docs); @@ -670,6 +672,9 @@ func (x *ObjectRangeReader) readChunk(buf []byte) (int, bool) { case *v2object.SplitInfo: x.err = object.NewSplitInfoError(object.NewSplitInfoFromV2(v)) return read, false + case *v2object.ECInfo: + x.err = object.NewECInfoError(object.NewECInfoFromV2(v)) + return read, false case *v2object.GetRangePartChunk: partChunk = v } @@ -730,6 +735,7 @@ func (x *ObjectRangeReader) close(ignoreEOF bool) (*ResObjectRange, error) { // Return errors: // // *object.SplitInfoError (returned on virtual objects with PrmObjectRange.MakeRaw). +// *object.ECInfoError (returned on erasure-coded objects with PrmObjectRange.MakeRaw). // // Return statuses: // - global (see Client docs); diff --git a/go.mod b/go.mod index b5bc388..d600ded 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.frostfs.info/TrueCloudLab/frostfs-sdk-go go 1.20 require ( - git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240422151450-df9b65324a4c + git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240427200446-67c6f305b21f git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230307110621-19a8ef2d02fb git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 git.frostfs.info/TrueCloudLab/hrw v1.2.1 diff --git a/go.sum b/go.sum index 1a30d38b5eac7eb4e7d752e13519715a248ffe8c..754d2d7c0241317530350bf784c61723d6ef35f7 100644 GIT binary patch delta 118 zcmbQamu1arkb^{*9Od$Z% C@+1QQ delta 22 ecmZ3ppJnD=mJNM8la=|jo6qoWKf}xTKo9_I!wBI3