forked from TrueCloudLab/frostfs-node
[#2234] writecache: Fix possible panic in initFlushMarks
In case we have many small objects in the write-cache, `indices` should not be reused between iterations. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
315141dc2c
commit
d1d123d180
2 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,7 @@ func (c *cache) initFlushMarks() {
|
|||
var batchSize = flushBatchSize
|
||||
for {
|
||||
m = m[:0]
|
||||
indices = indices[:0]
|
||||
|
||||
// We put objects in batches of fixed size to not interfere with main put cycle a lot.
|
||||
_ = c.db.View(func(tx *bbolt.Tx) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue