From cb6d097e0a5aa55c7cd1d3494612b7637fb77917 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Thu, 7 Dec 2023 11:42:29 +0300 Subject: [PATCH] [#847] node: Drop/resolve TODO's Signed-off-by: Dmitrii Stepanov --- .golangci.yml | 2 +- cmd/frostfs-cli/modules/control/util.go | 1 - cmd/frostfs-cli/modules/object/get.go | 1 - cmd/frostfs-cli/modules/object/head.go | 2 -- cmd/frostfs-cli/modules/object/put.go | 1 - cmd/frostfs-node/container.go | 5 +--- cmd/frostfs-node/object.go | 5 ++-- pkg/core/object/sender_classifier.go | 2 -- pkg/local_object_storage/engine/evacuate.go | 4 +-- pkg/local_object_storage/metabase/counter.go | 2 +- pkg/local_object_storage/pilorama/forest.go | 1 - pkg/local_object_storage/pilorama/types.go | 3 --- pkg/morph/client/container/eacl.go | 1 - pkg/morph/client/container/eacl_set.go | 1 - pkg/morph/client/container/get.go | 1 - pkg/morph/client/container/put.go | 1 - pkg/services/container/morph/executor.go | 23 +++++++++++------- pkg/services/container/morph/executor_test.go | 6 ++--- pkg/services/control/ir/server/sign.go | 14 +++++------ pkg/services/control/server/sign.go | 14 +++++------ pkg/services/object/acl/acl.go | 2 -- pkg/services/object/acl/v2/util.go | 2 -- pkg/services/object/get/container.go | 3 --- pkg/services/object/get/v2/get_forwarder.go | 1 - .../object/get/v2/get_range_forwarder.go | 1 - pkg/services/object/get/v2/head_forwarder.go | 1 - .../object/search/v2/request_forwarder.go | 1 - pkg/services/tree/service.pb.go | Bin 124265 -> 124212 bytes pkg/services/tree/service.proto | 1 - pkg/services/tree/signature.go | 1 - 30 files changed, 38 insertions(+), 65 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 5c7e9d918..b6190bdb7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -25,7 +25,7 @@ linters-settings: # report about shadowed variables check-shadowing: false staticcheck: - checks: ["all", "-SA1019"] # TODO Enable SA1019 after deprecated warning are fixed. + checks: ["all"] funlen: lines: 80 # default 60 statements: 60 # default 40 diff --git a/cmd/frostfs-cli/modules/control/util.go b/cmd/frostfs-cli/modules/control/util.go index ffaceff13..9def7dc22 100644 --- a/cmd/frostfs-cli/modules/control/util.go +++ b/cmd/frostfs-cli/modules/control/util.go @@ -51,7 +51,6 @@ func verifyResponse(cmd *cobra.Command, commonCmd.ExitOnErr(cmd, "", errors.New("missing response signature")) } - // TODO(@cthulhu-rider): #468 use Signature message from FrostFS API to avoid conversion var sigV2 refs.Signature sigV2.SetScheme(refs.ECDSA_SHA512) sigV2.SetKey(sigControl.GetKey()) diff --git a/cmd/frostfs-cli/modules/object/get.go b/cmd/frostfs-cli/modules/object/get.go index 9a888ccd3..ceb9f7ad5 100644 --- a/cmd/frostfs-cli/modules/object/get.go +++ b/cmd/frostfs-cli/modules/object/get.go @@ -108,7 +108,6 @@ func getObject(cmd *cobra.Command, _ []string) { func processResult(cmd *cobra.Command, res *internalclient.GetObjectRes, binary bool, payloadBuffer *bytes.Buffer, out io.Writer, filename string) { if binary { objToStore := res.Header() - // TODO(@acid-ant): #1932 Use streams to marshal/unmarshal payload objToStore.SetPayload(payloadBuffer.Bytes()) objBytes, err := objToStore.Marshal() commonCmd.ExitOnErr(cmd, "", err) diff --git a/cmd/frostfs-cli/modules/object/head.go b/cmd/frostfs-cli/modules/object/head.go index db466e588..a3cb012c7 100644 --- a/cmd/frostfs-cli/modules/object/head.go +++ b/cmd/frostfs-cli/modules/object/head.go @@ -162,8 +162,6 @@ func printHeader(cmd *cobra.Command, obj *objectSDK.Object) error { if signature := obj.Signature(); signature != nil { cmd.Print("ID signature:\n") - - // TODO(@carpawell): #468 implement and use another approach to avoid conversion var sigV2 refs.Signature signature.WriteToV2(&sigV2) diff --git a/cmd/frostfs-cli/modules/object/put.go b/cmd/frostfs-cli/modules/object/put.go index a41d3c0aa..4a074b556 100644 --- a/cmd/frostfs-cli/modules/object/put.go +++ b/cmd/frostfs-cli/modules/object/put.go @@ -156,7 +156,6 @@ func readFilePayload(filename string, cmd *cobra.Command) (io.Reader, cid.ID, us buf, err := os.ReadFile(filename) commonCmd.ExitOnErr(cmd, "unable to read given file: %w", err) objTemp := objectSDK.New() - // TODO(@acid-ant): #1932 Use streams to marshal/unmarshal payload commonCmd.ExitOnErr(cmd, "can't unmarshal object from given file: %w", objTemp.Unmarshal(buf)) payloadReader := bytes.NewReader(objTemp.Payload()) cnr, _ := objTemp.ContainerID() diff --git a/cmd/frostfs-node/container.go b/cmd/frostfs-node/container.go index 5477947d7..3b53f110c 100644 --- a/cmd/frostfs-node/container.go +++ b/cmd/frostfs-node/container.go @@ -67,10 +67,7 @@ func configureEACLAndContainerSources(c *cfg, client *cntClient.Client, cnrSrc c subscribeToContainerCreation(c, func(e event.Event) { ev := e.(containerEvent.PutSuccess) - // read owner of the created container in order to update the reading cache. - // TODO: use owner directly from the event after neofs-contract#256 will become resolved - // but don't forget about the profit of reading the new container and caching it: - // creation success are most commonly tracked by polling GET op. + // read owner of the created container in order to update the reading cache cnr, err := cnrSrc.Get(ev.ID) if err == nil { cachedContainerStorage.containerCache.set(ev.ID, cnr, nil) diff --git a/cmd/frostfs-node/object.go b/cmd/frostfs-node/object.go index 79f492190..a02df377d 100644 --- a/cmd/frostfs-node/object.go +++ b/cmd/frostfs-node/object.go @@ -45,6 +45,8 @@ import ( "go.uber.org/zap" ) +var errInvalidSignature = errors.New("invalid signature of the eACL table") + type objectSvc struct { put *putsvcV2.Service @@ -448,8 +450,7 @@ func (s *morphEACLFetcher) GetEACL(cnr cid.ID) (*containercore.EACL, error) { } if !eaclInfo.Signature.Verify(binTable) { - // TODO(@cthulhu-rider): #468 use "const" error - return nil, errors.New("invalid signature of the eACL table") + return nil, errInvalidSignature } return eaclInfo, nil diff --git a/pkg/core/object/sender_classifier.go b/pkg/core/object/sender_classifier.go index ac881431e..c901d146f 100644 --- a/pkg/core/object/sender_classifier.go +++ b/pkg/core/object/sender_classifier.go @@ -47,8 +47,6 @@ func (c SenderClassifier) Classify( ) (res *ClassifyResult, err error) { ownerKeyInBytes := ownerKey.Bytes() - // TODO: #767 get owner from frostfs.id if present - // if request owner is the same as container owner, return RoleUser if ownerID.Equals(cnr.Owner()) { return &ClassifyResult{ diff --git a/pkg/local_object_storage/engine/evacuate.go b/pkg/local_object_storage/engine/evacuate.go index 7bb37ef61..0e986425f 100644 --- a/pkg/local_object_storage/engine/evacuate.go +++ b/pkg/local_object_storage/engine/evacuate.go @@ -275,9 +275,7 @@ func (e *StorageEngine) evacuateShard(ctx context.Context, shardID string, prm E var c *meta.Cursor for { listPrm.WithCursor(c) - - // TODO (@fyrchik): #1731 this approach doesn't work in degraded modes - // because ListWithCursor works only with the metabase. + // this approach doesn't work in degraded modes because ListWithCursor works only with the metabase. listRes, err := sh.ListWithCursor(ctx, listPrm) if err != nil { if errors.Is(err, meta.ErrEndOfListing) || errors.Is(err, shard.ErrDegradedMode) { diff --git a/pkg/local_object_storage/metabase/counter.go b/pkg/local_object_storage/metabase/counter.go index 96d80077d..581df7a59 100644 --- a/pkg/local_object_storage/metabase/counter.go +++ b/pkg/local_object_storage/metabase/counter.go @@ -239,7 +239,7 @@ func (db *DB) updateShardObjectCounter(tx *bbolt.Tx, typ objectType, delta uint6 return b.Put(counterKey, newCounter) } -func (db *DB) updateContainerCounter(tx *bbolt.Tx, delta map[cid.ID]ObjectCounters, inc bool) error { // TODO #838 +func (db *DB) updateContainerCounter(tx *bbolt.Tx, delta map[cid.ID]ObjectCounters, inc bool) error { b := tx.Bucket(containerCounterBucketName) if b == nil { return nil diff --git a/pkg/local_object_storage/pilorama/forest.go b/pkg/local_object_storage/pilorama/forest.go index b82e5b3bd..b3a85fb8f 100644 --- a/pkg/local_object_storage/pilorama/forest.go +++ b/pkg/local_object_storage/pilorama/forest.go @@ -18,7 +18,6 @@ type memoryForest struct { var _ Forest = (*memoryForest)(nil) // NewMemoryForest creates new empty forest. -// TODO: this function will eventually be removed and is here for debugging. func NewMemoryForest() ForestStorage { return &memoryForest{ treeMap: make(map[string]*memoryTree), diff --git a/pkg/local_object_storage/pilorama/types.go b/pkg/local_object_storage/pilorama/types.go index 8d8616364..0ec503b61 100644 --- a/pkg/local_object_storage/pilorama/types.go +++ b/pkg/local_object_storage/pilorama/types.go @@ -7,15 +7,12 @@ import ( ) // Timestamp is an alias for integer timestamp type. -// TODO: remove after the debugging. type Timestamp = uint64 // Node is used to represent nodes. -// TODO: remove after the debugging. type Node = uint64 // Meta represents arbitrary meta information. -// TODO: remove after the debugging or create a proper interface. type Meta struct { Time Timestamp Items []KeyValue diff --git a/pkg/morph/client/container/eacl.go b/pkg/morph/client/container/eacl.go index 8e9455050..ad64e3a96 100644 --- a/pkg/morph/client/container/eacl.go +++ b/pkg/morph/client/container/eacl.go @@ -84,7 +84,6 @@ func (c *Client) GetEACL(cnr cid.ID) (*container.EACL, error) { } } - // TODO(@cthulhu-rider): #468 implement and use another approach to avoid conversion var sigV2 refs.Signature sigV2.SetKey(pub) sigV2.SetSign(sig) diff --git a/pkg/morph/client/container/eacl_set.go b/pkg/morph/client/container/eacl_set.go index c68104593..b75dd8066 100644 --- a/pkg/morph/client/container/eacl_set.go +++ b/pkg/morph/client/container/eacl_set.go @@ -31,7 +31,6 @@ func PutEACL(c *Client, eaclInfo containercore.EACL) error { prm.SetToken(eaclInfo.Session.Marshal()) } - // TODO(@cthulhu-rider): #468 implement and use another approach to avoid conversion var sigV2 refs.Signature eaclInfo.Signature.WriteToV2(&sigV2) diff --git a/pkg/morph/client/container/get.go b/pkg/morph/client/container/get.go index 6715f870f..b02834ac7 100644 --- a/pkg/morph/client/container/get.go +++ b/pkg/morph/client/container/get.go @@ -103,7 +103,6 @@ func (c *Client) Get(cid []byte) (*containercore.Container, error) { } } - // TODO(@cthulhu-rider): #468 implement and use another approach to avoid conversion var sigV2 refs.Signature sigV2.SetKey(pub) sigV2.SetSign(sigBytes) diff --git a/pkg/morph/client/container/put.go b/pkg/morph/client/container/put.go index ee323af00..a209db69d 100644 --- a/pkg/morph/client/container/put.go +++ b/pkg/morph/client/container/put.go @@ -28,7 +28,6 @@ func Put(c *Client, cnr containercore.Container) (*cid.ID, error) { prm.SetToken(cnr.Session.Marshal()) } - // TODO(@cthulhu-rider): #468 implement and use another approach to avoid conversion var sigV2 refs.Signature cnr.Signature.WriteToV2(&sigV2) diff --git a/pkg/services/container/morph/executor.go b/pkg/services/container/morph/executor.go index dec022219..60b2103a0 100644 --- a/pkg/services/container/morph/executor.go +++ b/pkg/services/container/morph/executor.go @@ -42,6 +42,13 @@ type Writer interface { PutEACL(containercore.EACL) error } +var ( + errMissingSignature = errors.New("missing signature") + errMissingContainerField = errors.New("missing container field") + errMissingContainerID = errors.New("missing container ID") + errMissingUserID = errors.New("missing user ID") +) + func NewExecutor(rdr Reader, wrt Writer) containerSvc.ServiceExecutor { return &morphExecutor{ rdr: rdr, @@ -52,13 +59,12 @@ func NewExecutor(rdr Reader, wrt Writer) containerSvc.ServiceExecutor { func (s *morphExecutor) Put(_ context.Context, tokV2 *sessionV2.Token, body *container.PutRequestBody) (*container.PutResponseBody, error) { sigV2 := body.GetSignature() if sigV2 == nil { - // TODO(@cthulhu-rider): #468 use "const" error - return nil, errors.New("missing signature") + return nil, errMissingSignature } cnrV2 := body.GetContainer() if cnrV2 == nil { - return nil, errors.New("missing container field") + return nil, errMissingContainerField } var cnr containercore.Container @@ -99,7 +105,7 @@ func (s *morphExecutor) Put(_ context.Context, tokV2 *sessionV2.Token, body *con func (s *morphExecutor) Delete(_ context.Context, tokV2 *sessionV2.Token, body *container.DeleteRequestBody) (*container.DeleteResponseBody, error) { idV2 := body.GetContainerID() if idV2 == nil { - return nil, errors.New("missing container ID") + return nil, errMissingContainerID } var id cid.ID @@ -137,7 +143,7 @@ func (s *morphExecutor) Delete(_ context.Context, tokV2 *sessionV2.Token, body * func (s *morphExecutor) Get(_ context.Context, body *container.GetRequestBody) (*container.GetResponseBody, error) { idV2 := body.GetContainerID() if idV2 == nil { - return nil, errors.New("missing container ID") + return nil, errMissingContainerID } var id cid.ID @@ -177,7 +183,7 @@ func (s *morphExecutor) Get(_ context.Context, body *container.GetRequestBody) ( func (s *morphExecutor) List(_ context.Context, body *container.ListRequestBody) (*container.ListResponseBody, error) { idV2 := body.GetOwnerID() if idV2 == nil { - return nil, fmt.Errorf("missing user ID") + return nil, errMissingUserID } var id user.ID @@ -206,8 +212,7 @@ func (s *morphExecutor) List(_ context.Context, body *container.ListRequestBody) func (s *morphExecutor) SetExtendedACL(_ context.Context, tokV2 *sessionV2.Token, body *container.SetExtendedACLRequestBody) (*container.SetExtendedACLResponseBody, error) { sigV2 := body.GetSignature() if sigV2 == nil { - // TODO(@cthulhu-rider): #468 use "const" error - return nil, errors.New("missing signature") + return nil, errMissingSignature } eaclInfo := containercore.EACL{ @@ -239,7 +244,7 @@ func (s *morphExecutor) SetExtendedACL(_ context.Context, tokV2 *sessionV2.Token func (s *morphExecutor) GetExtendedACL(_ context.Context, body *container.GetExtendedACLRequestBody) (*container.GetExtendedACLResponseBody, error) { idV2 := body.GetContainerID() if idV2 == nil { - return nil, errors.New("missing container ID") + return nil, errMissingContainerID } var id cid.ID diff --git a/pkg/services/container/morph/executor_test.go b/pkg/services/container/morph/executor_test.go index 42dd0b77e..694a3151b 100644 --- a/pkg/services/container/morph/executor_test.go +++ b/pkg/services/container/morph/executor_test.go @@ -82,7 +82,7 @@ func TestInvalidToken(t *testing.T) { reqBody.SetContainer(&cnrV2) sign(&reqBody) - _, err = e.Put(context.TODO(), tokV2, &reqBody) + _, err = e.Put(context.Background(), tokV2, &reqBody) return }, }, @@ -92,7 +92,7 @@ func TestInvalidToken(t *testing.T) { var reqBody container.DeleteRequestBody reqBody.SetContainerID(&cnrV2) - _, err = e.Delete(context.TODO(), tokV2, &reqBody) + _, err = e.Delete(context.Background(), tokV2, &reqBody) return }, }, @@ -103,7 +103,7 @@ func TestInvalidToken(t *testing.T) { reqBody.SetSignature(new(refs.Signature)) sign(&reqBody) - _, err = e.SetExtendedACL(context.TODO(), tokV2, &reqBody) + _, err = e.SetExtendedACL(context.Background(), tokV2, &reqBody) return }, }, diff --git a/pkg/services/control/ir/server/sign.go b/pkg/services/control/ir/server/sign.go index f72d51f9e..27499b90d 100644 --- a/pkg/services/control/ir/server/sign.go +++ b/pkg/services/control/ir/server/sign.go @@ -19,13 +19,16 @@ type SignedMessage interface { SetSignature(*control.Signature) } -var errDisallowedKey = errors.New("key is not in the allowed list") +var ( + errDisallowedKey = errors.New("key is not in the allowed list") + errInvalidSignature = errors.New("invalid signature") + errMissingSignature = errors.New("missing signature") +) func (s *Server) isValidRequest(req SignedMessage) error { sign := req.GetSignature() if sign == nil { - // TODO(@cthulhu-rider): #468 use "const" error - return errors.New("missing signature") + return errMissingSignature } var ( @@ -50,7 +53,6 @@ func (s *Server) isValidRequest(req SignedMessage) error { return fmt.Errorf("marshal request body: %w", err) } - // TODO(@cthulhu-rider): #468 use Signature message from FrostFS API to avoid conversion var sigV2 refs.Signature sigV2.SetKey(sign.GetKey()) sigV2.SetSign(sign.GetSign()) @@ -62,8 +64,7 @@ func (s *Server) isValidRequest(req SignedMessage) error { } if !sig.Verify(binBody) { - // TODO(@cthulhu-rider): #468 use "const" error - return errors.New("invalid signature") + return errInvalidSignature } return nil @@ -83,7 +84,6 @@ func SignMessage(key *ecdsa.PrivateKey, msg SignedMessage) error { return fmt.Errorf("calculate signature: %w", err) } - // TODO(@cthulhu-rider): #468 use Signature message from FrostFS API to avoid conversion var sigV2 refs.Signature sig.WriteToV2(&sigV2) diff --git a/pkg/services/control/server/sign.go b/pkg/services/control/server/sign.go index acc405821..bf2a33732 100644 --- a/pkg/services/control/server/sign.go +++ b/pkg/services/control/server/sign.go @@ -19,13 +19,16 @@ type SignedMessage interface { SetSignature(*control.Signature) } -var errDisallowedKey = errors.New("key is not in the allowed list") +var ( + errDisallowedKey = errors.New("key is not in the allowed list") + errMissingSignature = errors.New("missing signature") + errInvalidSignature = errors.New("invalid signature") +) func (s *Server) isValidRequest(req SignedMessage) error { sign := req.GetSignature() if sign == nil { - // TODO(@cthulhu-rider): #468 use "const" error - return errors.New("missing signature") + return errMissingSignature } var ( @@ -50,7 +53,6 @@ func (s *Server) isValidRequest(req SignedMessage) error { return fmt.Errorf("marshal request body: %w", err) } - // TODO(@cthulhu-rider): #468 use Signature message from FrostFS API to avoid conversion var sigV2 refs.Signature sigV2.SetKey(sign.GetKey()) sigV2.SetSign(sign.GetSign()) @@ -62,8 +64,7 @@ func (s *Server) isValidRequest(req SignedMessage) error { } if !sig.Verify(binBody) { - // TODO(@cthulhu-rider): #468 use "const" error - return errors.New("invalid signature") + return errInvalidSignature } return nil @@ -83,7 +84,6 @@ func SignMessage(key *ecdsa.PrivateKey, msg SignedMessage) error { return fmt.Errorf("calculate signature: %w", err) } - // TODO(@cthulhu-rider): #468 use Signature message from FrostFS API to avoid conversion var sigV2 refs.Signature sig.WriteToV2(&sigV2) diff --git a/pkg/services/object/acl/acl.go b/pkg/services/object/acl/acl.go index 921545c8b..3c15deb4a 100644 --- a/pkg/services/object/acl/acl.go +++ b/pkg/services/object/acl/acl.go @@ -219,7 +219,6 @@ func isValidBearer(reqInfo v2.RequestInfo, st netmap.State) error { // 4. Then check if container owner signed this token. if !bearerSDK.ResolveIssuer(*token).Equals(ownerCnr) { - // TODO: #767 in this case we can issue all owner keys from frostfs.id and check once again return errBearerNotSignedByOwner } @@ -235,7 +234,6 @@ func isValidBearer(reqInfo v2.RequestInfo, st netmap.State) error { user.IDFromKey(&usrSender, ecdsa.PublicKey(keySender)) if !token.AssertUser(usrSender) { - // TODO: #767 in this case we can issue all owner keys from frostfs.id and check once again return errBearerInvalidOwner } diff --git a/pkg/services/object/acl/v2/util.go b/pkg/services/object/acl/v2/util.go index feda6a3cf..65d4b660d 100644 --- a/pkg/services/object/acl/v2/util.go +++ b/pkg/services/object/acl/v2/util.go @@ -124,7 +124,6 @@ func ownerFromToken(token *sessionSDK.Object) (*user.ID, *keys.PublicKey, error) } // 2. Then check if session token owner issued the session token - // TODO(@cthulhu-rider): #468 implement and use another approach to avoid conversion var tokV2 sessionV2.Token token.WriteToV2(&tokV2) @@ -136,7 +135,6 @@ func ownerFromToken(token *sessionSDK.Object) (*user.ID, *keys.PublicKey, error) tokenIssuer := token.Issuer() if !isOwnerFromKey(tokenIssuer, tokenIssuerKey) { - // TODO: #767 in this case we can issue all owner keys from frostfs.id and check once again return nil, nil, errInvalidSessionOwner } diff --git a/pkg/services/object/get/container.go b/pkg/services/object/get/container.go index d22b14192..c4d5715fd 100644 --- a/pkg/services/object/get/container.go +++ b/pkg/services/object/get/container.go @@ -77,9 +77,6 @@ func (r *request) processCurrentEpoch(ctx context.Context) bool { default: } - // TODO: #1142 consider parallel execution - // TODO: #1142 consider optimization: if status == SPLIT we can continue until - // we reach the best result - split info with linking object ID. var info client.NodeInfo client.NodeInfoFromNetmapElement(&info, addrs[i]) diff --git a/pkg/services/object/get/v2/get_forwarder.go b/pkg/services/object/get/v2/get_forwarder.go index 40aa3f62e..b32adc777 100644 --- a/pkg/services/object/get/v2/get_forwarder.go +++ b/pkg/services/object/get/v2/get_forwarder.go @@ -44,7 +44,6 @@ func (f *getRequestForwarder) forwardRequestToNode(ctx context.Context, addr net // compose meta header of the local server metaHdr := new(session.RequestMetaHeader) metaHdr.SetTTL(f.Request.GetMetaHeader().GetTTL() - 1) - // TODO: #1165 think how to set the other fields metaHdr.SetOrigin(f.Request.GetMetaHeader()) writeCurrentVersion(metaHdr) f.Request.SetMetaHeader(metaHdr) diff --git a/pkg/services/object/get/v2/get_range_forwarder.go b/pkg/services/object/get/v2/get_range_forwarder.go index 8a56c59a6..c4575cdc7 100644 --- a/pkg/services/object/get/v2/get_range_forwarder.go +++ b/pkg/services/object/get/v2/get_range_forwarder.go @@ -43,7 +43,6 @@ func (f *getRangeRequestForwarder) forwardRequestToNode(ctx context.Context, add // compose meta header of the local server metaHdr := new(session.RequestMetaHeader) metaHdr.SetTTL(f.Request.GetMetaHeader().GetTTL() - 1) - // TODO: #1165 think how to set the other fields metaHdr.SetOrigin(f.Request.GetMetaHeader()) writeCurrentVersion(metaHdr) diff --git a/pkg/services/object/get/v2/head_forwarder.go b/pkg/services/object/get/v2/head_forwarder.go index a1bce1517..b2c7d7014 100644 --- a/pkg/services/object/get/v2/head_forwarder.go +++ b/pkg/services/object/get/v2/head_forwarder.go @@ -43,7 +43,6 @@ func (f *headRequestForwarder) forwardRequestToNode(ctx context.Context, addr ne // compose meta header of the local server metaHdr := new(session.RequestMetaHeader) metaHdr.SetTTL(f.Request.GetMetaHeader().GetTTL() - 1) - // TODO: #1165 think how to set the other fields metaHdr.SetOrigin(f.Request.GetMetaHeader()) writeCurrentVersion(metaHdr) diff --git a/pkg/services/object/search/v2/request_forwarder.go b/pkg/services/object/search/v2/request_forwarder.go index 5a2e9b936..319f5f798 100644 --- a/pkg/services/object/search/v2/request_forwarder.go +++ b/pkg/services/object/search/v2/request_forwarder.go @@ -33,7 +33,6 @@ func (f *requestForwarder) forwardRequest(ctx context.Context, addr network.Addr // compose meta header of the local server metaHdr := new(session.RequestMetaHeader) metaHdr.SetTTL(f.Request.GetMetaHeader().GetTTL() - 1) - // TODO: #1165 think how to set the other fields metaHdr.SetOrigin(f.Request.GetMetaHeader()) f.Request.SetMetaHeader(metaHdr) diff --git a/pkg/services/tree/service.pb.go b/pkg/services/tree/service.pb.go index 5346613895989cf6ba53fcaee985b5308a50177c..1dc0c5e5d8827749dc48c670ef8cc980d6a21959 100644 GIT binary patch delta 23 fcmaEPihau|_6^^bZI(SR$=K|&V!O)!lUzl^N+3r2=W^{JfIH%)HbhPZx!h W%%arflAKDt=8wy^e_Y1sYzF|i-W$LG diff --git a/pkg/services/tree/service.proto b/pkg/services/tree/service.proto index ec63d88ec..14669925e 100644 --- a/pkg/services/tree/service.proto +++ b/pkg/services/tree/service.proto @@ -154,7 +154,6 @@ message RemoveResponse { message MoveRequest { message Body { - // TODO import neo.fs.v2.refs.ContainerID directly. // Container ID in V2 format. bytes container_id = 1; // The name of the tree. diff --git a/pkg/services/tree/signature.go b/pkg/services/tree/signature.go index 15067d3cd..b0c590dc4 100644 --- a/pkg/services/tree/signature.go +++ b/pkg/services/tree/signature.go @@ -175,7 +175,6 @@ func verifyMessage(m message) error { sig := m.GetSignature() - // TODO(@cthulhu-rider): #468 use Signature message from FrostFS API to avoid conversion var sigV2 refs.Signature sigV2.SetKey(sig.GetKey()) sigV2.SetSign(sig.GetSign()) -- 2.45.2