diff --git a/pkg/local_object_storage/writecache/persist.go b/pkg/local_object_storage/writecache/persist.go index 035e8e8d..491d293f 100644 --- a/pkg/local_object_storage/writecache/persist.go +++ b/pkg/local_object_storage/writecache/persist.go @@ -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) }