[#1462] writecache: remove useless logs

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-06-02 20:39:40 +03:00 committed by LeL
parent 2ae7c94cd6
commit feef9a98f7

View file

@ -106,6 +106,11 @@ func (c *cache) flush() {
} }
} }
if len(m) == 0 {
c.modeMtx.RUnlock()
break
}
c.evictObjects(len(m)) c.evictObjects(len(m))
for i := range m { for i := range m {
c.flushed.Add(m[i].addr, true) c.flushed.Add(m[i].addr, true)
@ -115,12 +120,6 @@ func (c *cache) flush() {
c.log.Debug("flushed items from write-cache", c.log.Debug("flushed items from write-cache",
zap.Int("count", len(m)), zap.Int("count", len(m)),
zap.String("start", base58.Encode(lastKey))) zap.String("start", base58.Encode(lastKey)))
if len(m) > 0 {
lastKey = append([]byte(m[len(m)-1].addr), 0)
} else {
break
}
} }
} }