Repository navigation
Pack streaming follow-ups for #656: a size-cap fix, less work per pull, native inflate #660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Maximo-Guk
wants to merge
24
commits into
chore/git-pack-streaming
from
maximo/git-pack-streaming-followups
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e85dac8
Bound a pack entry's size varint
Maximo-Guk 953cf79
Read a pack in full 64 KiB buffers
Maximo-Guk 25fa791
Skip the pull-routing hint a gatekeeper has already proven
Maximo-Guk bba045a
Leave an object the gatekeeper already stored untouched
Maximo-Guk 6355337
Measure an oversized pack entry as it arrives
Maximo-Guk 4b4e0e9
Store a streamed blob without a transaction of its own
Maximo-Guk e1a748a
Deflate loose git objects at zlib's fastest level
Maximo-Guk 579aa3c
Inflate pack entries with native zlib
Maximo-Guk 08146e0
Test a pack arriving over RPC, and pin the delta order rule
Maximo-Guk bb3aff8
Say what consumePack returns and leaves behind on failure
Maximo-Guk 2163ddb
Bound the oversized objects kept as delta bases
Maximo-Guk 3f75573
Drop oversized bases only from a pack of blobs alone
Maximo-Guk 0f45e11
Drop only the oversized bases a pull asked for by name
Maximo-Guk b3dd592
Report why a git fetch failed, not the disconnect the cache saw
Maximo-Guk 1976503
Give a pack's objects their own size cap, and raise the pack's
Maximo-Guk 60c5292
Raise the git fetch transfer limit to match the pack cap
Maximo-Guk 3f5e2a6
Time a git fetch out on a quiet server, not on its total length
Maximo-Guk cef2254
Bound how much of one pack entry the reader buffers
Maximo-Guk d918113
Leave the size of a pack to the overseer
Maximo-Guk 7f38a77
Say that the pack cap is the one limit on a pull's size
Maximo-Guk 90e30af
Give the stall guard a timer that is never undefined
Maximo-Guk 84353e9
Decode a pack entry from what has arrived, and name its input limit
Maximo-Guk 78d9be0
Bound the part of a fetch response that is not pack data
Maximo-Guk ec0cedd
Inflate a large pack entry a read at a time
Maximo-Guk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Final flush bypasses fetch overhead limit
When a response chunk ends with a flush,
demuxPackDatareturns before checking accumulated overhead. A single chunk can carry excessive progress data and still complete successfully.Learn more
The demultiplexer counts body bytes in
receivedand pack bytes indelivered, but checks their difference only after processing every parsed packet in a chunk. Processing a flush exits the generator from inside that loop, so a chunk containing a flush never reaches this check. That is common for a small response received as one chunk, and it can also happen after a large progress packet. The intended response overhead limit is then unenforced for the final chunk.Example: A fetch body arrives as one chunk containing the packfile header, a small band-1 pack, twenty 60,000-byte band-2 progress packets, and a flush. The generator yields the pack and returns on the flush; it never checks the roughly 1.2 MB of progress against the 1 MB allowance.
Recommended fix: Check the accumulated overhead before returning on a flush, and ensure the check also runs for terminal packets in a chunk. Keep the ordinary between-chunk check for responses that continue without a flush.
Was this helpful? React with 👍 or 👎 to provide feedback.