diff --git a/pkg/local_object_storage/writecache/flush.go b/pkg/local_object_storage/writecache/flush.go index 91052e9f0..bdebad897 100644 --- a/pkg/local_object_storage/writecache/flush.go +++ b/pkg/local_object_storage/writecache/flush.go @@ -37,7 +37,7 @@ const ( func (c *Cache) runFlushLoop() { for i := 0; i < c.workersCount; i++ { c.wg.Add(1) - go c.flushWorker(i) + go c.smallObjectsFlusher() } c.wg.Add(1) @@ -56,7 +56,7 @@ func (c *Cache) runFlushLoop() { for { select { case <-tt.C: - c.flushDB() + c.flushSmallObjects() tt.Reset(defaultFlushInterval) case <-c.closeCh: return @@ -65,7 +65,7 @@ func (c *Cache) runFlushLoop() { }() } -func (c *Cache) flushDB() { +func (c *Cache) flushSmallObjects() { var lastKey []byte var m []objectInfo for { @@ -228,8 +228,8 @@ func (c *Cache) flushFSTree(ctx context.Context, ignoreErrors bool) error { return err } -// flushWorker writes objects to the main storage. -func (c *Cache) flushWorker(_ int) { +// smallObjectsFlusher writes small objects to the main storage. +func (c *Cache) smallObjectsFlusher() { defer c.wg.Done() var obj *object.Object