Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
amankrx
marked this pull request as draft
October 15, 2026 08:26
palfrey
previously approved these changes
Oct 15, 2026
amankrx
marked this pull request as ready for review
October 16, 2026 04:43
corcillo
reviewed
Oct 16, 2026
corcillo
reviewed
Oct 16, 2026
corcillo
requested changes
Oct 16, 2026
corcillo
previously approved these changes
Oct 16, 2026
… feat/adaptive-read-permits
This branch was successfully deployed
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.
What and why
Nothing bounds the reads one process keeps in flight against an object store. A cold worker opens 64 downloads per directory level per action, and an account over its limit answers 503 to most of them, each a wasted transaction and a retry in lockstep. This adds
AdaptivePermits, a pool sized the way TCP sizes its window: halve on a throttle, not below a floor, grow by one after sixteen successes.CommonObjectSpecgainsmax_concurrent_reads(0, unbounded, the default),adaptive_read_concurrencyandmin_concurrent_reads. The Azure store takes a permit forGETandHEAD, held through the body, and reports what came back. Metricsstore.object.read_limitandstore.object.read_waits. S3 and GCS follow once this is proven.How was this verified?
Eight pool tests: halving to the floor, one cut per window, growth to the ceiling, the streak reset, a cut with permits out settled on release, growth cancelling owed permits, a fixed pool, a waiting acquire. Two Azure tests with the mock transport: two 503s then a 200 take the limit from 16 to 4 and fifteen more answered reads raise it to 5; a fixed limit does not move. Not yet run against a throttling account.
Risk
Low by default: with
max_concurrent_readsunset no pool exists. Set, reads queue in the process; the floor defaults to 4.AI assistance
An agent drafted the change and I reviewed every line.