Skip to content

Take into account key size for MemorySizedCache - #6720

Draft
ncoiffier-celonis wants to merge 1 commit into
mainfrom
also-take-into-account-key-size-for-MemorySizedCache
Draft

Take into account key size for MemorySizedCache#6720
ncoiffier-celonis wants to merge 1 commit into
mainfrom
also-take-into-account-key-size-for-MemorySizedCache

Conversation

@ncoiffier-celonis

@ncoiffier-celonis ncoiffier-celonis commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Description

Attempt to fix #6719.

  • create a MemUsage trait
  • implement MemUsage for CacheKey and SliceAddress
  • modify the 3 base cache implementations to take into account the key mem_usage when inserting and reporting the cache in_cache_num_bytes and evict_num_bytes
  • hits_num_bytes still return the value size only, without taking into account the key size.
  • the changes should be mostly self-contained in the quickwit-storage/cache module

How was this PR tested?

Unit tests only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MemorySizedCache could be leaking memory.

1 participant