forked from TrueCloudLab/frostfs-node
[#1745] writecache: Simplify object counters
Remove unused option and additional pointers to db/fstree. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
20abdaeed4
commit
bda084f331
3 changed files with 8 additions and 59 deletions
|
@ -124,12 +124,7 @@ func (c *cache) Open(readOnly bool) error {
|
|||
// thus we need to create a channel here.
|
||||
c.closeCh = make(chan struct{})
|
||||
|
||||
c.objCounters = &counters{
|
||||
db: c.db,
|
||||
fs: c.fsTree,
|
||||
}
|
||||
|
||||
return c.objCounters.Read()
|
||||
return c.initCounters()
|
||||
}
|
||||
|
||||
// Init runs necessary services.
|
||||
|
@ -154,11 +149,6 @@ func (c *cache) Close() error {
|
|||
c.closeCh = nil
|
||||
}
|
||||
|
||||
if c.objCounters != nil {
|
||||
c.objCounters.FlushAndClose()
|
||||
c.objCounters = nil
|
||||
}
|
||||
|
||||
var err error
|
||||
if c.db != nil {
|
||||
err = c.db.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue