forked from TrueCloudLab/frostfs-node
[#1731] services/control: Replicate object over network in EvacuateShard RPC
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
a49137349b
commit
4e043a801c
8 changed files with 121 additions and 11 deletions
|
@ -43,6 +43,7 @@ import (
|
|||
getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/tombstone"
|
||||
tsourse "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/tombstone/source"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/replicator"
|
||||
trustcontroller "github.com/nspcc-dev/neofs-node/pkg/services/reputation/local/controller"
|
||||
truststorage "github.com/nspcc-dev/neofs-node/pkg/services/reputation/local/storage"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/tree"
|
||||
|
@ -116,6 +117,8 @@ type cfg struct {
|
|||
|
||||
respSvc *response.Service
|
||||
|
||||
replicator *replicator.Replicator
|
||||
|
||||
cfgControlService cfgControlService
|
||||
|
||||
treeService *tree.Service
|
||||
|
|
|
@ -30,6 +30,8 @@ func initControlService(c *cfg) {
|
|||
controlSvc.WithAuthorizedKeys(rawPubs),
|
||||
controlSvc.WithHealthChecker(c),
|
||||
controlSvc.WithNetMapSource(c.netMapSource),
|
||||
controlSvc.WithContainerSource(c.cfgObject.cnrSource),
|
||||
controlSvc.WithReplicator(c.replicator),
|
||||
controlSvc.WithNodeState(c),
|
||||
controlSvc.WithLocalStorage(c.cfgObject.cfgLocalStorage.localStorage),
|
||||
controlSvc.WithTreeService(c.treeService),
|
||||
|
|
|
@ -207,7 +207,7 @@ func initObjectService(c *cfg) {
|
|||
log: c.log,
|
||||
}
|
||||
|
||||
repl := replicator.New(
|
||||
c.replicator = replicator.New(
|
||||
replicator.WithLogger(c.log),
|
||||
replicator.WithPutTimeout(
|
||||
replicatorconfig.PutTimeout(c.appCfg),
|
||||
|
@ -232,7 +232,7 @@ func initObjectService(c *cfg) {
|
|||
policer.WithHeadTimeout(
|
||||
policerconfig.HeadTimeout(c.appCfg),
|
||||
),
|
||||
policer.WithReplicator(repl),
|
||||
policer.WithReplicator(c.replicator),
|
||||
policer.WithRedundantCopyCallback(func(addr oid.Address) {
|
||||
var inhumePrm engine.InhumePrm
|
||||
inhumePrm.MarkAsGarbage(addr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue