Repository navigation
Speed up Typhon.Engine unit tests (~189s → ~50s) + fix a page-cache seqlock stall - #550
Conversation
…ing the ModificationCounter, so the checkpoint spin-waited its 100ms skip timeout on a phantom writer (~650ms per engine close). Reset on reuse + guard CopyPageWithSeqlock against a stale odd counter on an unlatched page. Adds a regression test. Parallelize the suite: strip [NonParallelizable] from fixtures whose only reason was the archetype-registry race (fixed upstream by #547). Isolate the 7 Durability fixtures' DBs into per-fixture temp dirs to remove parallel file-lock contention. Raise the default test page-cache 2→8 MiB. Keep NonParallelizable on the timing-sensitive Runtime fixtures.
|
📝 Doc-accuracy review (advisory · scoped · Layer 2) Reviewed:
Findings:
Advisory & scoped to the pages the change touches — recall for cross-cutting or unmapped drift is covered by the weekly Layer 3 audit. |
|
📝 Doc-accuracy review (advisory · scoped · Layer 2) Reviewed:
Skipped (low drift risk, no cache-size / seqlock / TestMode content expected): Findings:
Advisory & scoped to the pages the change touches — recall for cross-cutting or unmapped drift is covered by the weekly Layer 3 audit. |
#549 [no-doc] commit token to skip the doc-accuracy review Mirror of [no-ut]: a case-insensitive [no-doc] token in the PR head commit message skips the advisory Layer-2 doc-accuracy review, saving a billed Claude turn + a redundant comment when a commit cannot affect doc accuracy. Reads pull_request.head.sha (fallback github.sha) so the synthetic merge commit doesn't mask it; gates both the Claude review step and the map-gap nudge. Independent of [no-ut] (no [no-ci] umbrella). Documents both tokens together in CONTRIB.md. CI: rebalance engine test shards from post-speedup durations shard.py already bin-packs by class time, but shards.json was balanced against a pre-#550 trx; after the uneven ~4.5x speedup WalIntegrationTests (~35s, one indivisible fixture) became the long pole, leaving the run's max shard ~65s. Regenerated shards.json from the #550 c6id durations so the max shard drops to ~35s (WAL is the floor; the rest balance to ~32s). shard.py plan now accepts multiple --trx files and unions them, so the plan regenerates directly from a gate run's per-shard trx.
Summary
Cuts Typhon.Engine unit-test wall-clock from ~189s to ~50s (~3.8×), and fixes a real page-cache seqlock stall found along the way plus a false-positive in the regression test that guards it.
Changes
Page-cache seqlock stall fix (
775ef9a)Reused cache slots kept a stale odd
ModificationCounter, so a checkpoint copying such a page spin-waited its 100ms skip timeout on a phantom writer. Fix: reset the counter to even on slot reuse (TryAcquire), plus a guard inCopyPageWithSeqlockthat skips a stale-odd non-Exclusivepage immediately instead of spinning.Reproduced and verified by measurement (min-cache pressure schema, timing engine close):
Test-execution speedups
[NonParallelizable]markers (unblocked by PR Enforce StorageMode is fixed per (component, revision); fixes parallel-fixture data-loss #547's StorageMode-per-(name,revision) fix), plus per-fixture temp-dir I/O isolation and an 8 MiB test cache default.TestMode: same-process tests read back through the OS page cache, soRandomAccess.FlushToDiskis dead weight; crash-durability fixtures leaveTestModeoff and keep real fsync.Seqlock invariant-check scope fix
The regression check
CountQuiescentPagesWithOddSeqlockinspected every resident page, including the CK-05 meta pair (logical pages 0–1), which does not participate in the seqlock (different header format,IsExternallyPersisted, never copied byCopyPageWithSeqlock). It read the meta generation as an "odd counter" and failed ~10% of runs. Scoped the check to seqlock pages; added a coherent under-lock diagnostic collector for failure detail. Engine unchanged.Verification
🤖 Generated with Claude Code