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
cache: concurrent eviction returns CacheFull with memory free #69
Found by a memory-accounting audit of 8b3c813. The tests are on branch audit/memory-tests and fail on main today; check out that branch to run them. File and line links point at that commit.
What goes wrong.
With evict_victims_concurrently on, which is the production default (src/core/src/cache/builders.rs:64 sets !cfg!(test)), evict_victims collects every victim's result and propagates the first Err with ? (core.rs:829-835).
One victim failing its disk reservation fails the whole insert, even when the other victims already freed enough memory.
The inferred mechanism: concurrent victims reserve all the disk, and a later victim finds no disk victim to evict because no record has been installed yet.
Evidence.
An insert was refused with memory at 5,984 + 352 = 6,336 bytes, under the 7,040-byte limit. The same insert succeeded under sequential eviction.
Under production defaults, the first failure came at 34,840 of 51,456 bytes used.
cargo +1.96.0 test -p liquid-cache --lib audit_prod_failed_insert_strands_victims_small_disk_concurrent -- --nocapture
Not inline: the test needs the branch's audit_insert_over_small_disk and audit_cache helpers. Related: #43 notes that no test covers the concurrent path.
Flags: P probabilistic (a pass after a fix only means the race wasn't hit), F interleaving forced by a test hook, L Linux only, D needs Docker, M measurement only, C control (passes by design).
Activity