From 44f2e8f27fcf6a10ae2b0dc0fdc8842026bcd386 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Thu, 16 May 2024 10:05:17 +0300 Subject: [PATCH] [#1129] putSvc: Allow to put single unprepared object to EC container Signed-off-by: Dmitrii Stepanov --- pkg/services/object/put/single.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg/services/object/put/single.go b/pkg/services/object/put/single.go index 43b3b0ac1..6d2f3dba8 100644 --- a/pkg/services/object/put/single.go +++ b/pkg/services/object/put/single.go @@ -34,10 +34,7 @@ import ( "go.uber.org/zap" ) -var ( - errInvalidPayloadChecksum = errors.New("incorrect payload checksum") - errInvalidECObject = errors.New("object must be splitted to EC parts") -) +var errInvalidPayloadChecksum = errors.New("incorrect payload checksum") type putSingleRequestSigner struct { req *objectAPI.PutSingleRequest @@ -181,10 +178,6 @@ func (s *Service) saveToREPReplicas(ctx context.Context, placement putSinglePlac } func (s *Service) saveToECReplicas(ctx context.Context, placement putSinglePlacement, obj *objectSDK.Object, req *objectAPI.PutSingleRequest, meta object.ContentMeta) error { - if obj.Type() == objectSDK.TypeRegular && obj.ECHeader() == nil { - return errInvalidECObject - } - commonPrm, err := svcutil.CommonPrmFromV2(req) if err != nil { return err