forked from TrueCloudLab/frostfs-node
[#1418] engine: Do not use pointers as parameters
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
6e752f36dc
commit
babd382ba5
20 changed files with 134 additions and 119 deletions
|
@ -103,7 +103,7 @@ type localObjectInhumer struct {
|
|||
}
|
||||
|
||||
func (r *localObjectInhumer) DeleteObjects(ts oid.Address, addr ...oid.Address) error {
|
||||
prm := new(engine.InhumePrm)
|
||||
var prm engine.InhumePrm
|
||||
prm.WithTarget(ts, addr...)
|
||||
|
||||
_, err := r.storage.Inhume(prm)
|
||||
|
@ -235,7 +235,10 @@ func initObjectService(c *cfg) {
|
|||
),
|
||||
policer.WithReplicator(repl),
|
||||
policer.WithRedundantCopyCallback(func(addr oid.Address) {
|
||||
_, err := ls.Inhume(new(engine.InhumePrm).MarkAsGarbage(addr))
|
||||
var inhumePrm engine.InhumePrm
|
||||
inhumePrm.MarkAsGarbage(addr)
|
||||
|
||||
_, err := ls.Inhume(inhumePrm)
|
||||
if err != nil {
|
||||
c.log.Warn("could not inhume mark redundant copy as garbage",
|
||||
zap.String("error", err.Error()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue