You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MEMORY USAGE over-counts short keys of hashes with field TTLs (inline keys since #490) #497
field_expiry::watch_entry_size(key_len) returns size_of::<(Entry, Instant)>() + 1 + key_len. That assumes the key is a heap-allocated String. Since #490, Entry's key is a KeyBytes, which keeps keys of up to 23 bytes inline, so for those keys MEMORY USAGE of a hash with field TTLs counts about key_len bytes that were never allocated.
The current tolerances in tests/memory_usage_accuracy.rs still pass. Fix: count key_len only when KeyBytes would put the key on the heap.
Activity