mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
lib/blockcache: return proper number of entries from the cache
This has been broken in 0d7374ad2f
This commit is contained in:
parent
21bd204e81
commit
cde4664f0d
@ -199,7 +199,10 @@ end:
|
||||
// Len returns the number of blocks in the cache c.
|
||||
func (c *Cache) Len() int {
|
||||
c.mu.RLock()
|
||||
n := len(c.m)
|
||||
n := 0
|
||||
for _, m := range c.m {
|
||||
n += len(m)
|
||||
}
|
||||
c.mu.RUnlock()
|
||||
return n
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user