Skip to content

Commit 21814f7

Browse files
committed
docs(vendor): correct the durability read attribution
The baseline note named writeLooseRefDurable and a second ref read inside the ref write. That symbol is not in the tree, and commitDurably's git.writeRef path is unchanged. The measured deltas stay; the hunk that explains them is createIndexRollback.
1 parent 4c2ccf7 commit 21814f7

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

‎docs/VENDORING.md‎

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,12 @@ policy change this sync deliberately does not make.
446446

447447
`aa7b78ee`'s storage-isogit rewrite (`runtime.ts`, `commit-helpers.ts`, the new
448448
`node-durability.ts`, merged into the patched `store.ts`) makes each
449-
session-record checkpoint read the git state it is about to overwrite and fsync
450-
what it writes: HEAD and refs resolved before the commit, the index captured for
451-
rollback, loose refs written through `writeLooseRefDurable`. That is extra
452-
filesystem traffic on the turn-persistence hot path, so the sync measured it
453-
instead of asserting it was free.
449+
session-record checkpoint read the git state it is about to overwrite.
450+
`createIndexRollback` (`commit-helpers.ts`) calls `resolveHead` and captures
451+
`.git/index` on every commit, and `store.ts` calls it unconditionally. The
452+
ref-write path (`commitDurably` → `git.writeRef`) is unchanged from the
453+
previous pin. That is extra filesystem traffic on the turn-persistence hot
454+
path, so the sync measured it instead of asserting it was free.
454455

455456
Method: the two persistence harnesses the CI perf gate already runs, 200
456457
synthetic turns each, counted by the harnesses' own `fs.promises` counters (the
@@ -478,12 +479,15 @@ census; wall time, which the gate deliberately ignores, went 635 → 609 ms and
478479
The +1,000 `.git` reads decompose per path (200 turns, from a preload that
479480
records the exact `.git`-relative target of each `node:fs/promises` call):
480481
`packed-refs` 1,006 → 1,406, `HEAD` 804 → 1,004, loose `refs/…` 403 → 603,
481-
`index` 602 → 802, with loose-object reads flat at 1,648 — one `resolveHead`
482-
(HEAD + packed-refs + loose ref) plus one index capture per checkpoint, and the
483-
same ref reads again inside the ref write. The +400 `readFile` / +200 `stat`
484-
outside `.git` is the status-and-stage walk, which now runs against an index the
485-
checkpoint deliberately does not rewrite: the coalesced census shows exactly
486-
that trade, −200 `.git/index` writes with `persistCalls` unchanged.
482+
`index` 602 → 802, with loose-object reads flat at 1,648. `createIndexRollback`
483+
accounts for the HEAD, loose-ref, and index deltas: one `resolveHead` plus one
484+
index capture per checkpoint. The remaining +200 `packed-refs` reads are in the
485+
same measurement; no changed hunk explains them, and the ref-write path above
486+
is untouched. The +400 `readFile` / +200 `stat` outside `.git` is the
487+
status-and-stage walk against an index the checkpoint no longer rewrites per
488+
file: upstream batches `git.add` where the previous pin looped it, and the
489+
census write delta is `.git/index` (about 401 → 201) with `persistCalls`
490+
unchanged.
487491

488492
These are counted operations, not timings, so the shift is deterministic and the
489493
perf gate fails on it exactly: `COUNTED_OP_TOLERANCE = 0` for every op that is

0 commit comments

Comments
 (0)