forked from TrueCloudLab/frostfs-node
[#1088] writecache: Fix small flushed when persist
Signed-off-by: ZhangTao1596 <zhangtao@ngd.neo.org>
This commit is contained in:
parent
7c02a2e251
commit
ac82899e85
1 changed files with 3 additions and 1 deletions
|
@ -79,12 +79,14 @@ func (c *cache) persistSmallObjects(objs []objectInfo) {
|
|||
if err != nil {
|
||||
overflowIndex = 0
|
||||
} else {
|
||||
c.evictObjects(overflowIndex)
|
||||
c.evictObjects(len(objs) - overflowIndex)
|
||||
}
|
||||
|
||||
for i := 0; i < overflowIndex; i++ {
|
||||
storagelog.Write(c.log, storagelog.AddressField(objs[i].addr), storagelog.OpField("db PUT"))
|
||||
c.objCounters.IncDB()
|
||||
}
|
||||
for i := overflowIndex; i < len(objs); i++ {
|
||||
c.flushed.Add(objs[i].addr, true)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue