Sealed length inflate past EOF must not drop the tail - #13
Open
paulocsanz wants to merge 3 commits into
Open
Conversation
Inflating val_size so the record does not fit never reaches CRC. scan_sealed used to return the prefix. This fails on current main.
A complete header that claims a body bigger than the file is bitrot of the CRC'd length fields, not a torn tail. scan_sealed and rebuild_from_records now CrcMismatch instead of returning a silent prefix.
A complete header whose body never landed is a torn tail. Fail-stop only when a later CRC-ok record is still in the file (mid-file val_size inflate). Restores torn_footer_falls_back_to_scan_across_files.
Contributor
Author
|
CI red was two things:
The distinguisher is now: fail-stop only when a later CRC-ok record still sits in the file (the mid-file |
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.
#11 fail-stops on a fully-framed mid-file CRC. Inflating
val_sizeso the record does not fit never reaches CRC;scan_sealed/rebuild_from_recordstreated that as a torn tail and returned the prefix.Two commits: a test that fails on main, then fail-stop (
CrcMismatch). A short header at EOF is still a torn tail.git checkout HEAD~1 && cargo test -p beyond-kv-engine --lib sealed_inflatedfails; HEAD passes.