writecache: Fix race condition when reporting cache size metrics #1648

Merged
dstepanov-yadro merged 1 commit from a-savchuk/frostfs-node:fix-write-cache-object-count-metric into master 2025-02-20 06:15:39 +00:00

View file

@ -87,6 +87,9 @@ func (c *cache) pushToFlushQueue(ctx context.Context, fl *flushLimiter) {
} }
c.modeMtx.RUnlock() c.modeMtx.RUnlock()
// counter changed by fstree
c.estimateCacheSize()
case <-ctx.Done(): case <-ctx.Done():
return return
} }