forked from TrueCloudLab/frostfs-node
[#563] writecache: Fix metrics and bolt delete
Estimate cache size after delete objects to update metric. Update counters on small object deletion. Do not count bbolt DB file as FSTree object. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
5bbfebba2d
commit
0e697266c3
3 changed files with 12 additions and 20 deletions
|
@ -68,6 +68,9 @@ func (c *cache) initCounters() error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("could not read write-cache FS counter: %w", err)
|
||||
}
|
||||
if inFS > 0 {
|
||||
inFS-- //small.bolt DB file
|
||||
}
|
||||
|
||||
c.objCounters.cDB.Store(inDB)
|
||||
c.objCounters.cFS.Store(inFS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue