perf(registry): share reconciliation storage limit - #1558
Closed
ricardo-devis-agullo wants to merge 2 commits into
Closed
perf(registry): share reconciliation storage limit#1558ricardo-devis-agullo wants to merge 2 commits into
ricardo-devis-agullo wants to merge 2 commits into
Conversation
Enforce one storage concurrency budget during legacy reconciliation. Replace nested per-component pLimit queues (M*M) with a shared indexed worker-pool (mapWithConcurrency) run in two sequential phases after the root listing, keeping only O(maxConcurrentRequests) live operations, preserving output order, semver sorting and corruption events.
Record first failure with explicit hasFirstError sentinel instead of overwriting firstError and using err ?? firstError fallback. Ensures concurrent rejections with null/undefined preserve the original reason and match Promise.all/pLimit externally visible rejection type.
ricardo-devis-agullo
deleted the
advisor/008-reconciliation-concurrency
branch
August 25, 2026 07:48
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.
Plan 008: Enforce one storage concurrency budget during legacy reconciliation
pLimitqueues (up to M² concurrent integrity reads) with a shared indexed worker-poolmapWithConcurrencylistSubDirectories: (1) per-component version listings (2) package-integritygetJsonvalidations, both bounded bycdn.maxConcurrentRequestsmapWithConcurrencypreallocates output, uses sharednextIndex, startsmin(concurrency, n)worker loops, aggregates only worker promises, validates concurrency likepLimit, preserves orderO(concurrency)live promises per phase; no nested-await deadlockcorrupted_versionevents,dir_not_foundhandling and rejection propagationutils-map-with-concurrency.js(10k deferred admission, order, rejection, worker-count) andregistry-domain-components-cache.jsglobal-concurrency fixtures (max 2, capacity 1/10, single-version invalid, dir-list rejection, empty registry, no leftover queued work)Closes plan 008.