Bound historical journal disk retention and expose eviction totals - #215
Merged
Merged
Conversation
This was referenced Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Historical journal names previously accumulated on disk after their file handles were retired. Each store now admits at most 1 GiB including accepted buffered bytes and 8192 canonical current/archive filenames. At pressure it removes the least recently written historical unit's files, preserving all open/failed file owners and reserving the name against a concurrent reopen. If no eligible history exists, capture drains and reports rejected output through existing loss/storage counters.
The lazy index bounds enumeration and metadata, leaves control available on malformed/oversized history, and retries failed indexing with bounded admission. Deletion stays beneath the opened journal directory and outside store/queue metadata locks. Successful partial eviction and each rotation step update accounting once. New
logEvictedFiles/logEvictedBytesstatus fields and machine CLI output distinguish retention from dropped output. The operations contract describes existing-history, external-writer and crash limits.Validation: full local race suite passed (journal 46.612s, manager 61.071s); vet and Windows/Linux staticcheck passed. Focused final indexing/fallback/blocked-deletion checks passed after the final retry recheck. Portable/native tests cover buffered budgets, historical churn, restart indexing, oversize/nonregular input, exact rotation accounting, partial-deletion retry, genuine Windows sharing violations, independent sync/admission progress, and manager eviction totals after configuration removal. An existing concurrent-capture test now gives its later main wait a fresh one-second deadline instead of reusing the helper's consumed deadline; 30 single-worker race repetitions passed. Full diff/privacy review and documentation link/whitespace checks passed.
Exact-source CI 34776212301 passed. The disposable one-CPU SYSTEM/headless-standard-user matrix passed all 52 cases three times per identity without skips, in 59.156s and 61.255s. Exact source/four-binary identity, complete fixture/process/profile/linger cleanup and unchanged hosting broker were verified; raw evidence is retained privately. This implements the disk-retention slice; it does not close R5.3's remaining severity contract or the broader diagnostics/stress/MSI/pilot gates.