[#217] cmd/node: Use local Inhume operation as a redundant copy callback
Exec `StorageEngine.Inhume` operation on redundant copy callback from Object Policer with `MarkAsGarbage` parameter. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
277e3ca20a
commit
f1a4b8d322
1 changed files with 8 additions and 0 deletions
|
@ -202,6 +202,14 @@ func initObjectService(c *cfg) {
|
||||||
c.viper.GetDuration(cfgPolicerHeadTimeout),
|
c.viper.GetDuration(cfgPolicerHeadTimeout),
|
||||||
),
|
),
|
||||||
policer.WithReplicator(repl),
|
policer.WithReplicator(repl),
|
||||||
|
policer.WithRedundantCopyCallback(func(addr *objectSDK.Address) {
|
||||||
|
_, err := ls.Inhume(new(engine.InhumePrm).MarkAsGarbage(addr))
|
||||||
|
if err != nil {
|
||||||
|
c.log.Warn("could not inhume mark redundant copy as garbage",
|
||||||
|
zap.String("error", err.Error()),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
addNewEpochNotificationHandler(c, func(ev event.Event) {
|
addNewEpochNotificationHandler(c, func(ev event.Event) {
|
||||||
|
|
Loading…
Reference in a new issue