From 2614aa15823f1ba87081330dee45f9688d06a631 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 17 Nov 2022 18:50:52 +0300 Subject: [PATCH] [#2074] write-cache: Remove unused variables Signed-off-by: Pavel Karpy --- pkg/local_object_storage/writecache/flush.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/local_object_storage/writecache/flush.go b/pkg/local_object_storage/writecache/flush.go index 3a6aed5b3..68d90e799 100644 --- a/pkg/local_object_storage/writecache/flush.go +++ b/pkg/local_object_storage/writecache/flush.go @@ -27,10 +27,6 @@ const ( defaultFlushInterval = time.Second ) -// errMustBeReadOnly is returned when write-cache must be -// in read-only mode to perform an operation. -var errMustBeReadOnly = errors.New("write-cache must be in read-only mode") - // runFlushLoop starts background workers which periodically flush objects to the blobstor. func (c *cache) runFlushLoop() { for i := 0; i < c.workersCount; i++ { @@ -71,7 +67,6 @@ func (c *cache) flushDB() { } m = m[:0] - sz := 0 c.modeMtx.RLock() if c.readOnly() { @@ -89,7 +84,6 @@ func (c *cache) flushDB() { continue } - sz += len(k) + len(v) m = append(m, objectInfo{ addr: string(k), data: slice.Copy(v),