[#790] writecache: Log each writing operation

Call `storagelog.Write` in all places after the successful writing op.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-06 17:28:55 +03:00 committed by Leonard Lyubich
parent 4f73c00776
commit 3258d9c616
5 changed files with 27 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import (
"errors"
"github.com/nspcc-dev/neofs-node/pkg/core/object"
storagelog "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/internal/log"
)
// ErrBigObject is returned when object is too big to be placed in cache.
@ -34,6 +35,9 @@ func (c *cache) Put(o *object.Object) error {
c.mem = append(c.mem, oi)
c.mtx.Unlock()
storagelog.Write(c.log, storagelog.AddressField(oi.addr), storagelog.OpField("in-mem PUT"))
return nil
}