Skip to content

Commit

Permalink
Merge 21f783d into e0dce10
Browse files Browse the repository at this point in the history
  • Loading branch information
carpawell authored Feb 28, 2022
2 parents e0dce10 + 21f783d commit e8a62ff
Show file tree
Hide file tree
Showing 20 changed files with 1,291 additions and 1,025 deletions.
30 changes: 16 additions & 14 deletions cmd/neofs-node/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
objectTransportGRPC "github.com/nspcc-dev/neofs-node/pkg/network/transport/object/grpc"
objectService "github.com/nspcc-dev/neofs-node/pkg/services/object"
"github.com/nspcc-dev/neofs-node/pkg/services/object/acl"
v2 "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/v2"
deletesvc "github.com/nspcc-dev/neofs-node/pkg/services/object/delete"
deletesvcV2 "github.com/nspcc-dev/neofs-node/pkg/services/object/delete/v2"
getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get"
Expand Down Expand Up @@ -194,7 +195,7 @@ func initObjectService(c *cfg) {

coreConstructor := (*coreClientConstructor)(clientConstructor)

var irFetcher acl.InnerRingFetcher
var irFetcher v2.InnerRingFetcher

if c.cfgMorph.client.ProbeNotary() {
irFetcher = &innerRingFetcherWithNotary{
Expand Down Expand Up @@ -345,21 +346,22 @@ func initObjectService(c *cfg) {
},
)

aclSvc := acl.New(
acl.WithSenderClassifier(
acl.NewSenderClassifier(
c.log,
irFetcher,
c.cfgNetmap.wrapper,
),
),
acl.WithContainerSource(
aclSvc := v2.New(
v2.WithLogger(c.log),
v2.WithIRFetcher(irFetcher),
v2.WithNetmapClient(c.cfgNetmap.wrapper),
v2.WithContainerSource(
c.cfgObject.cnrSource,
),
acl.WithNextService(splitSvc),
acl.WithLocalStorage(ls),
acl.WithEACLSource(c.cfgObject.eaclSource),
acl.WithNetmapState(c.cfgNetmap.state),
v2.WithNextService(splitSvc),
v2.WithEACLChecker(
acl.NewChecker(new(acl.CheckerPrm).
SetNetmapState(c.cfgNetmap.state).
SetEACLSource(c.cfgObject.eaclSource).
SetValidator(eaclSDK.NewValidator()).
SetLocalStorage(ls),
),
),
)

respSvc := objectService.NewResponseService(
Expand Down
8 changes: 4 additions & 4 deletions pkg/services/control/server/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"fmt"

"github.com/nspcc-dev/neofs-node/pkg/services/control"
objectSDKAddress "github.com/nspcc-dev/neofs-sdk-go/object/address"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

// DeletedObjectHandler is a handler of objects to be removed.
type DeletedObjectHandler func([]*objectSDKAddress.Address) error
type DeletedObjectHandler func([]*addressSDK.Address) error

// DropObjects marks objects to be removed from the local node.
//
Expand All @@ -26,10 +26,10 @@ func (s *Server) DropObjects(_ context.Context, req *control.DropObjectsRequest)
}

binAddrList := req.GetBody().GetAddressList()
addrList := make([]*objectSDKAddress.Address, 0, len(binAddrList))
addrList := make([]*addressSDK.Address, 0, len(binAddrList))

for i := range binAddrList {
a := objectSDKAddress.NewAddress()
a := addressSDK.NewAddress()

err := a.Unmarshal(binAddrList[i])
if err != nil {
Expand Down
Loading

0 comments on commit e8a62ff

Please sign in to comment.