fix(git-cli-proxy): bound concurrent page serves so blob-heavy windows cannot stack past the memory limit - #3033
Merged
Conversation
…s cannot stack past the memory limit Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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.
Cherry-pick of #3032 into release-2026.08.
Why. Nothing bounds how many page serves run at once:
heavyOpsConcurrencycaps clones/fetches/repacks, but each serve spawns git children whose memory scales with the window's blob bytes, so enough concurrent blob-heavy windows OOM-kill the pod — and now that long preparations are held instead of bounced, heavy serves actually run long enough to stack.What changed. A
serve_concurrencysemaphore (config-required like its heavy sibling; chart valuecache.serveConcurrency, default 4) gates the serve phase of every data endpoint at the sharedread_snapshotchoke point. The permit is taken afteropen()so a slot is never spent waiting on a preparation, and excess requests wait in-connection; a wait that outlives the preparation ceiling answers a typed 429 with its own quota subject and rejection metric.Verified. Clean cherry-pick.
cargo test -p git-cli-proxyon this branch (215 lib + 20 boot), helm contract suite (27).