Skip to content

Commit

Permalink
Fix cache item counting error
Browse files Browse the repository at this point in the history
Signed-off-by: Changxin Miao <[email protected]>
  • Loading branch information
polyrabbit committed Jan 2, 2025
1 parent c03663e commit 3b8a60f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/chunk/disk_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (c *cacheStore) enabled() bool {
}

func (c *cacheStore) full() bool {
return c.used > c.capacity || (c.maxItems != 0 && int64(len(c.pages)) > c.maxItems)
return c.used > c.capacity || (c.maxItems != 0 && int64(len(c.keys)) > c.maxItems)
}

func (cache *cacheStore) checkErr(f func() error) error {
Expand Down

0 comments on commit 3b8a60f

Please sign in to comment.