You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
performanceLegacy classification name; prefer type/performance. Retained for history.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/featureNew capability, new flag, new primitive.
Proposals are welcome before implementation. For substantive changes, wait
for a responsible human maintainer to approve the scope and identify a review
contact. An automated recommendation, label alone, or silence is not approval.
See Contributing.
Is your feature request related to a problem? Please describe.
With the archive transport from #4774, two apm install processes sharing one cache can both miss the same (repo, sha) cold. Each then downloads and verifies the same codeload archive before GitCache.land_tree_checkout takes the shard lock, and the loser discards its copy. Correctness holds: the landing is atomic and re-checked under the lock. But bandwidth and anonymous API quota (one git/trees call) are spent twice. The git path avoids this by taking the shard lock before its cache probe (cache/git_cache.py_create_checkout).
Describe the solution you'd like
Move archive fetch + verification behind a GitCache-owned miss lock for the full-tree shard, and re-check the shard after acquiring it, so waiting installers reuse the first result.
Done when a concurrency test (two processes, one cold shard) records exactly one codeload request and one trees request.
Out of scope: changing archive acceptance or routing.
Describe alternatives you've considered
Leave as is; duplicate work happens only with concurrent cold installs on a shared cache.
Additional context
Follow-up from the Copilot review on #4774; refs #4776.
Decision: approve
Area: project
Scope: Performance. With the archive transport (#4776), the archive fetch and its verification run behind a GitCache-owned miss lock for the full-tree shard, and the shard is re-checked after the lock is acquired, so concurrent cold installs that share one cache reuse the first verified result instead of downloading and verifying the same archive twice. Archive acceptance, verification, routing and the atomic landing under the shard lock are unchanged.
Done when: A concurrency test with two processes and one cold shard records exactly one codeload request and one trees request, and both installs succeed with identical content; existing archive transport tests stay green; CI is green. A CHANGELOG line is added if the archive transport has shipped by then.
Out of scope: Changing archive acceptance or routing; the git transport path; lock behaviour for other cache shards.
Review contact: Daniel Meppiel (@danielmeppiel)
Closed as not planned: the archive transport (#4774) was stopped on benchmark evidence (see the #4774 PR comment). The scope record on this issue is withdrawn with this closure.
performanceLegacy classification name; prefer type/performance. Retained for history.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/featureNew capability, new flag, new primitive.
Activity
danielmeppiel commentedon Nov 22, 2026
Decision: approve
Area: project
Scope: Performance. With the archive transport (#4776), the archive fetch and its verification run behind a GitCache-owned miss lock for the full-tree shard, and the shard is re-checked after the lock is acquired, so concurrent cold installs that share one cache reuse the first verified result instead of downloading and verifying the same archive twice. Archive acceptance, verification, routing and the atomic landing under the shard lock are unchanged.
Done when: A concurrency test with two processes and one cold shard records exactly one codeload request and one trees request, and both installs succeed with identical content; existing archive transport tests stay green; CI is green. A CHANGELOG line is added if the archive transport has shipped by then.
Out of scope: Changing archive acceptance or routing; the git transport path; lock behaviour for other cache shards.
Review contact: Daniel Meppiel (@danielmeppiel)
danielmeppiel commentedon Nov 22, 2026
Closed as not planned: the archive transport (#4774) was stopped on benchmark evidence (see the #4774 PR comment). The scope record on this issue is withdrawn with this closure.