[#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:
parent
4f73c00776
commit
3258d9c616
5 changed files with 27 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue