lib/workingsetcache: remove data race when resetting c.misses

This commit is contained in:
Aliaksandr Valialkin 2019-09-22 19:36:12 +03:00
parent 0adebae1f8
commit 48999e5396

View file

@ -216,7 +216,7 @@ func (c *Cache) Reset() {
curr := c.curr.Load().(*fastcache.Cache)
curr.Reset()
c.misses = 0
atomic.StoreUint64(&c.misses, 0)
}
// UpdateStats updates fcs with cache stats.