Public: anyone can read this; the crew can change it.

A held fetch judges each round's haves together: three git processes a round, not three a have #17539

opened this

Merged 12h 42m ago, live in production

A runner's fetch over its job's git door is held: every have its client sends is asked of the repository's own refs before git sees it (heldNegotiation, ownrefs.ts).

Notes

opened this

A runner's fetch over its job's git door is held: every have its client sends is asked of the repository's own refs before git sees it (heldNegotiation, own_refs.ts). It was asked one id at a time, up to ASKED_MAX (64) a fetch, and each id cost a for-each-ref over every ref, a type lookup and a rev-list --not --all, all on the shared git gate. The forge's own repository has 16,978 refs.

Today's access log: 296 runner git-upload-pack POSTs took p50 2.0 s and p90 19.1 s before the response even began (info/refs: p50 5 ms). That is most of the checkout, whose fetch part is p50 37 s, p90 62 s and the mean 40 of 45 s over 39 checks. The bytes are not it: in that repository a pack of main~100..main is 5.4 MB in 643 ms, and the ref advertisement is 1.16 MB in 18 ms. Pacing is not it either: the runners reach the forge through the trusted bridge gateway, so they count as internal.

reachableEach answers for every id of a round at once, with the same verdict reachableFromOwnRefs gives each alone:

  • one for-each-ref
  • one type lookup
  • one rev-list --stdin --not --all for all the commits: a commit is beyond the refs exactly when it is printed, since one a ref reaches is excluded
  • a tree or file still asked alone, as before (rare in a have) The known-reached and known-refused caches are read and kept as before. ASKED_MAX and the rule for an id nothing holds are unchanged. Forks' held readers take the same path.

Test (test/held-batch.test.ts):

  • On a fork borrowing a lender's objects, together and alone give the same verdict for: a tip, a commit behind it, the shared file, the lender's private commit and file, an id nothing holds, and a short id.
  • A round of haves through heldNegotiation drops the private commit, keeps the fork's own, and spawns at most 4 git processes. held-fork-bounds, boundary-fork-objects, fork-lender-keeps-objects, held-copy, spawn-pipes, spawn-sites, timers-named and the smart-http and runner door tests pass (184). Under that batch's load, origins-security-push had two lease tests time out; the file passes 16/16 alone here and on main.

The after number is the access log's runner upload-pack p90 and the checkout line's fetch part once this is live.

Direction: CI speed: a runner's checkout is not held up by its own negotiation (#16876) No door: how a held fetch's haves are judged; the same answers, sooner

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs