Repository navigation
Conversation
DSPX-5111 part 2. SparseSink takes a TDF as a stream of writes, copies only the retention-plan extents into an ExtentStore, and holds the last tail_ceiling bytes in a rolling buffer. On close it parses the central directory out of that buffer, keeps everything after the payload data (manifest entry, directory, end records), and records the logical length. A tail longer than the ceiling raises ManifestTooLarge instead of keeping part of it. zipinspect gains read_central_directory, which parses from any seekable source of a given size, so the buffer can stand in for the whole file. Signed-off-by: sujan kota <sujankota@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 1
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
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.



DSPX-5111 part 2 of 2. Stacked on #653.
SparseSinkreceives a TDF as a series of in-orderwrite()calls and copies only the retention-plan extents into anExtentStore. It also holds the lasttail_ceilingbytes in a rolling buffer.close()it parses the central directory out of that buffer, keeps everything after the payload data (manifest entry, directory and end records), and records the logical length.ManifestTooLargeinstead of keeping part of it. At 50 TiB with 2 MiB segments the manifest is about 2.6 GB, so the ceiling has to be sized for the run.zipinspect.read_central_directory()parses from any seekable source of a known size, so the buffer can stand in for the whole file.central_directory(path)now delegates to it, and the existing ZIP64 tests pass unchanged.write()consumer, so DSPX-5108's counted output sink can wrap it later. Wiring a real SDK's output into it is left to 5108 and 5118.Tests feed a synthetic TDF through the sink in chunks of 1 B, 7 B, 4 KiB and 1 MiB, with ZIP32 and ZIP64 local headers. They also cover a tail over the ceiling and a stream that ends before a planned extent.