Repository navigation
fix(id): recovery skips unreadable intent entries instead of aborting (#4125) - #4527
Merged
Merged
Conversation
…#4125) FileIntentStore::unresolved aborted on the first unreadable or unparseable *.json entry, so one corrupt or foreign file (or a *.json subdirectory) froze recovery for every pending conversion. The listing now skips such entries, never deletes them, and reports them via the new IntentStore::unreadable_entries (the trait contract documents the skip semantics); reconcile logs each skipped entry distinctly and reconciles everything readable. Tests cover a corrupt sibling file and a *.json subdirectory alongside a valid Recorded intent.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
4 tasks
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.
Fixes #4125 (queue task 6324).
Problem
FileIntentStore::unresolved()aborted on the first entry it could not read or parse, andrecovery::reconcilepropagated that error before reconciling anything — one corrupt/foreign*.jsonfile (or a subdirectory named*.json) froze recovery for every pending conversion, with no list of what was skipped.Change
FileIntentStore::unresolved()now skips entries it cannot read or parse and never deletes them; only a failure to enumerate the store directory itself remains an error.IntentStore::unreadable_entries()returns the entries the most recent listing skipped (path + reason, path order). Theunresolved()trait contract documents the skip semantics so the in-memory store and future stores agree; the in-memory store never skips.reconcilelogs each skipped entry distinctly ([recovery] skipping unreadable intent entry …) and reconciles everything readable.{not json) and a*.jsonsubdirectory next to a valid Recorded intent — reconcile resubmits the valid record (3 legs), the bad entry is reported viaunreadable_entries()and stays on disk.Tests
cargo test --lib currency_poc— 19 passed, 0 failed, 1 ignored (TigerBeetle harness smoke), including both new id(currency_poc): one corrupt or foreign .json file in the FileIntentStore directory aborts recovery for every pending conversion #4125 tests and all pre-existing currency_poc tests unchanged.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.