Corrupt cleanup journal blocks a partition's compaction and snapshot expiry, not only reclamation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
Research direction
Read src/core/cache/maintenance.js at lines 442 and 660, then the cited design decision in llp/0417-session-purge-across-storage.spec.md lines 233–235 and the referenced LLP 0220 partition-walk behavior. First decide through a new or superseding LLP whether maintenance should continue after an unreadable journal or expose a health signal. Done means implementing that decision and adding a corrupt-journal regression test.
Written by the indexing model from the issue text.
Description
Source: #2017 at 6bd3752d4a7e0f3fa70881e5f5e6a8c42aff5854
Location: src/core/cache/maintenance.js:442 (and :660)
Severity: medium
Evidence
maintainGeneration calls readCacheCleanup un-caught at its top (maintenance.js:442), ahead of the compaction and snapshot-expiry work, so a journal that is present but unparseable fails that partition's whole maintenance tick for as long as it stays corrupt; ongoing appends then accumulate snapshots and superseded files in that partition until a later purge of the same partition rebuilds the journal. The blast radius is one partition: the catch at maintenance.js:304 (@ref LLP 0220#walk-survives-a-partition) marks the partition failed and lets the walk continue, and walkForRetired independently catches its own read (maintenance.js:2672).
Why deferral is safe
At this head the behavior is documented design, not a spec-code contradiction: the sentence this PR corrected (llp/0417-session-purge-across-storage.spec.md:233-235) now states that an invalid journal blocks that partition's maintenance, compaction and snapshot expiry included. Changing it, catching the read and proceeding with compaction while refusing only reclamation, is a revisit of a recorded fail-closed decision and needs an LLP, not a code patch. The trigger is rare (journals are written by atomicWriteJson with fsync, tmp plus rename, so a torn journal needs a hand edit or unusual filesystem behavior), the failure is isolated per partition and surfaced as a failed partition report, and a purge of that partition self-heals it.
Acceptance condition
A design decision (new LLP extending or superseding the relevant part of LLP 0417) on whether maintainGeneration should survive an unreadable journal, blocking only reclamation, or whether the blocked-partition state should instead be surfaced as a health signal; then implement per that decision with a corrupt-journal regression test.
Review preference; backlog only. A human may explicitly delegate it with neutral:fix.
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 0
- Avg merge
- 2h 49m
- Merged PRs (30d)
- 302
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hyparam/hypaware
-
docs: ollama.md says --source ollama adds to an existing install, but without --force it refusesOpen
Difficulty 2/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
report_commands.js runtime output still says 'server' in four places; one names the destinationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
Maintainers usually reply within 1 day
All issues in hyparam/hypaware
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
parse-community/parse-server#10871 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4270 ·
-
502 on Node 26: ERR_INVALID_ARG_VALUE: Setting the TLS ServerName to an IP address is not permittedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
c1overzz/dsh-bili-scroll#189 ·
Maintainers usually reply within 1 day