Repository navigation
Conversation
…RAM disk Two problems with the first revision, both fixed by separating "how much runs at once" from "what runs". Selection. The nightly handed shard.py a custom single-shard catch-all plan instead of the gate's shards.json, and that silently ran 32 tests the gate deliberately skips. NUnit runs [Explicit] tests when it reads the filter as naming them, and a 2-term category filter qualifies where the gate's 305-term one does not — so a change made purely for concurrency reasons quietly changed the test SET. The tests in question say why that is wrong on this runner: "spawns 16-32 threads, run manually to avoid thread pool saturation in parallel CI" and "Performance benchmarks — run manually". Thread-saturating stress tests on a 3-core hosted runner measure the runner. The fix is a new SHARD_CONCURRENCY knob in shard.py that caps how many shards run at once WITHOUT touching the plan. The nightly now runs the gate's shards.json with SHARD_CONCURRENCY=1, so nightly and gate selection are identical by construction rather than by two mechanisms that have to be kept in agreement. Default is len(shards), so the gate and every local run are byte-identical to before — verified by re-running the default path against the modified script: 8 shards, 8 at a time, 4158 tests, green. NUnit's ExplicitMode runsettings knob was tried first and had no effect at any value. Worth knowing if someone reaches for it later: its default is Strict, which only stops Explicit tests being MIXED with non-Explicit ones, and the value the docs recommend for CI is None — neither changed the count here. I/O. Test databases now live on a 2 GiB RAM disk via TMPDIR. The suite roots every database directory at Path.GetTempPath() — 58 files do, including TestBase and AllocatorTestBase — and .NET resolves that through TMPDIR on Unix, so one env var moves the main database file and the WAL alike off the runner's disk. Same lever the self-hosted c6id gate pulls with TMPDIR=/nvme. Two runs of identical code took 113s and 616s, with the 500s concentrated in fsync-heavy reopen tests, while the same commit runs in 90s on a developer machine: hosted-runner disk throughput is the variable. 2 GiB against a measured ~32 MiB suite footprint; the summary prints df so it can be right-sized from data rather than guessed at twice. Verified locally: sequential gate plan 4191 -> 4158 tests, green, 107s, with OlcBTreeStressTests, OlcBTreeRaceStressTests, SpatialPerfTests, SubscriptionStressTests, ConcurrencyTracingStressTests, DagSchedulerCpuTests and RawValueHashMapScaleRepro all absent, and the three [Explicit] benchmarks inside the mixed DagSchedulerLatencyTests excluded while its plain test still runs. The RAM-disk step itself is macOS-only and could not be exercised off-runner. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LKFzE7MqQUj13s8a7q895D
`hdiutil attach -nomount` pads its output to a fixed width ("/dev/disk6 "), and diskutil will not resolve a device path with trailing whitespace. It fails with "Unable to find disk for /dev/disk6" — where the padding is invisible in the message, so the error reads like the device does not exist rather than like a quoting bug.
Caught by the run on PR #640, which is what the pull_request path filter on this workflow exists for: the RAM-disk step is macOS-only and cannot be exercised off-runner.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LKFzE7MqQUj13s8a7q895D
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.
Follow-up to #638. Two problems with that first revision, both fixed by separating how much runs at once from what runs.
Selection — the nightly was running tests the gate deliberately skips
The nightly handed
shard.pya custom single-shard catch-all plan instead of the gate'sshards.json. That silently ran 32 extra tests: NUnit runs[Explicit]tests when it reads the filter as naming them, and a 2-term category filter qualifies where the gate's 305-term one does not. So a change made purely for concurrency reasons quietly changed the test set.Those tests say why that is wrong on a 3-core hosted runner, in their own attributes:
Fix: a new
SHARD_CONCURRENCYknob inshard.pycaps how many shards run at once without touching the plan. The nightly now runs the gate'sshards.jsonwithSHARD_CONCURRENCY=1— nightly and gate selection are identical by construction, not by two mechanisms that have to be kept in agreement.SHARD_CONCURRENCYdefaults tolen(shards), so the gate and every local run are unchanged. Verified by re-running the default path against the modified script:8 shards, 8 at a time, 4158 tests, green.I/O — test databases move to a RAM disk
The suite roots every database directory at
Path.GetTempPath()(58 files, includingTestBaseandAllocatorTestBase), and .NET resolves that throughTMPDIRon Unix. So one env var moves all test I/O — main database file and WAL alike — off the runner's disk. Same lever the self-hosted c6id gate pulls withTMPDIR=/nvmeinrun-gate.sh.Why: two runs of identical code took 113 s and 616 s, with the 500 s concentrated in fsync-heavy reopen tests (
WAL_*_SurvivesReopen,WalSegmentReclaimReopen,UowRegistryoverflow pages), while the same commit runs in 90 s on a developer machine. Hosted-runner disk throughput is the variable, not the engine.Sized at 2 GiB against a measured ~32 MiB suite footprint (the GiB-scale temp dirs on a dev box belong to benchmarks and AOT POCs, not this suite). The job summary prints
dfso it can be right-sized from data rather than guessed at twice.Verified locally
OlcBTreeStressTests,OlcBTreeRaceStressTests,SpatialPerfTests,SubscriptionStressTests,ConcurrencyTracingStressTests,DagSchedulerCpuTests,RawValueHashMapScaleRepro.[Explicit]benchmarks inDagSchedulerLatencyTestsare excluded while its plain test still runs.shard.py: unchanged, green.Not verifiable off-runner: the RAM-disk step itself (
hdiutil/diskutilare macOS-only). The run on this PR is that test.Still open, unchanged by this PR
WalCommitBuffer.cs:452passesctx.Deadline.Remainingas the wait duration toThrowWalBackPressureTimeout.Remainingis ~0 by definition once the deadline has expired, so the exception can only ever report "timeout after 0ms" — it should carry elapsed wait time.[Explicit]tests run under a plain catch-all filter but not under the gate's K=8 plan (SeqlockCounterSlotReuseTests.SlotReuseUnderCachePressure_…,WalSegmentReclaimReopenTests×2,PagedHashMapTests.Stress_Torture_32Threads_AllOperations). Selection parity means the nightly now misses them too. Not root-caused; a gate coverage hole in its own right.🤖 Generated with Claude Code
https://claude.ai/code/session_01LKFzE7MqQUj13s8a7q895D