Details
-
Bug
-
Status: In Review (View Workflow)
-
Major
-
Resolution: Unresolved
-
23.02, 23.08, 24.02, 25.01, 25.10, 26.10
-
None
-
MXS-SPRINT-282
Description
When a cached value has expired according to hard_ttl and is discarded during a lookup, neither the inmemory storage nor the LRU storage wrapping it decrement their items and size counters. As a result:
- the reported items and size keep growing and no longer reflect the actual content of the cache;
- with max_size, the cache eventually considers itself full on every store and evicts all entries, although it is nearly empty;
- with max_count, the item count stays at the maximum while the actual entries are removed, and eventually an eviction is attempted on an empty LRU list, which asserts in debug builds and is undefined behaviour in release builds.
In addition, the inmemory storage counts a discarded value as a hit although no value is returned.