Repository navigation
test(cache): respect kernel purges in history eviction checks - #819
superuser404notfound merged 1 commit into
Conversation
9c544c3
into
superuser404notfound:main
… it (#819) #819 fixed the race in the eviction test, where the kernel could empty consumed history between pop() and the no-eviction check. The same race sat in every test that re-reads history: a cursor restore, a still walk, the history-cap recent restore and the read-ahead's seek-back hit could all fail at random under suite memory pressure. SoftwarePacketMemoryFIFO gains an internal kernelMayPurge switch. With it off, consumed chunks are marked volatile in the store's bookkeeping only and stay non-volatile for the kernel, so purgeHistoryForTesting (which also empties a non-volatile region) is the only thing that empties them. The history-reading tests use it, and the eviction test checks the no-eviction case on real history again instead of before any exists. The purge, walk-refusal and residency-count tests keep real kernel purging. Playback always constructs the store with the default (true). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
|
Merged, thanks @yucelokan. The diagnosis is right: consumed chunks are volatile VM, and the kernel may empty them between Two follow-ups landed on main in a320dab:
The fix is an internal |
…changelog for #829 A prepared commit rebuilt the primary takeover by hand and skipped three things the ordinary external select does: it left a running OCR worker armed, logged nothing (a commit was invisible in the diagnostic log), and did not re-assert the native rendition while the picture is off this device (Sodalite#156). Preparation and commit also refused a session mid-seek as stale, although `loadGeneration` already catches teardown; `.seeking` now counts as the same session. The AVERROR_EOF literals read `FFmpegErr.eof`, and the intent counter no longer sits between `loadGeneration` and its doc comment. The #819 and #827 changelog entries had landed under 7.40.0 and move to Unreleased with the #829 one, now in house style. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
|
Released in 7.45.0 ( |
Summary
Make the purgeable-history eviction regression independent of when the kernel reclaims consumed packet data. Check the no-eviction case while packets are still unread and therefore protected from purging.
What changed
CHANGELOG.md. Production code and public APIs are unchanged.Test plan
swift build -j 2passed, includingExampleSources.swift test -j 2 --filter SoftwarePacketMemoryFIFOTestspassed all 11 tests.python3 Scripts/check-doc-links.pypassed.Checklist
CHANGELOG.mdupdated