mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00: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
1 changed files with 4 additions and 1 deletions
|
@ -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 a new issue