mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 16:30:55 +01:00
lib/blockcache: return proper number of entries from the cache
This has been broken in 0d7374ad2f
This commit is contained in:
parent
75c5c33694
commit
87071640a7
@ -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