forked from TrueCloudLab/frostfs-node
[#2074] write-cache: Remove unused variables
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
15d2091f42
commit
2614aa1582
1 changed files with 0 additions and 6 deletions
|
@ -27,10 +27,6 @@ const (
|
||||||
defaultFlushInterval = time.Second
|
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.
|
// runFlushLoop starts background workers which periodically flush objects to the blobstor.
|
||||||
func (c *cache) runFlushLoop() {
|
func (c *cache) runFlushLoop() {
|
||||||
for i := 0; i < c.workersCount; i++ {
|
for i := 0; i < c.workersCount; i++ {
|
||||||
|
@ -71,7 +67,6 @@ func (c *cache) flushDB() {
|
||||||
}
|
}
|
||||||
|
|
||||||
m = m[:0]
|
m = m[:0]
|
||||||
sz := 0
|
|
||||||
|
|
||||||
c.modeMtx.RLock()
|
c.modeMtx.RLock()
|
||||||
if c.readOnly() {
|
if c.readOnly() {
|
||||||
|
@ -89,7 +84,6 @@ func (c *cache) flushDB() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
sz += len(k) + len(v)
|
|
||||||
m = append(m, objectInfo{
|
m = append(m, objectInfo{
|
||||||
addr: string(k),
|
addr: string(k),
|
||||||
data: slice.Copy(v),
|
data: slice.Copy(v),
|
||||||
|
|
Loading…
Reference in a new issue